fjgandrade / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

JsClr Dictionary add does not check for duplicate keys #212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The code for Dictionary.Remove seems to have no provision for checking if a key 
currently exists:
https://code.google.com/p/sharpkit/source/browse/trunk/SharpKit.JsClr/res/jsclr-
4.1.0.js#4592

Yet in .NET, that should throw an ArgumentException:
http://msdn.microsoft.com/en-us/library/k7z0zy8k%28v=vs.100%29.aspx

Original issue reported on code.google.com by a...@zfirmllc.com on 7 Sep 2012 at 5:57

GoogleCodeExporter commented 9 years ago
You're right, it will be fixed, feel free to commit these changes yourself if 
you wish.
Thanks!

Original comment by DanelK...@gmail.com on 7 Sep 2012 at 7:05

GoogleCodeExporter commented 9 years ago

Original comment by yvan.rod...@gmail.com on 4 Oct 2012 at 5:23

GoogleCodeExporter commented 9 years ago
Implemented checks in Add() Remove() and indexer. Added KeyNotFoundException.

Original comment by yvan.rod...@gmail.com on 4 Oct 2012 at 5:27