func init // adds using namespace sys.add_use('System.Collections.Specialized') // initialize instance params = this.props('Constructor').value if(params == 'Constructor') params = '' elseif(params == 'Constructor2') params = '' + d("equalityComparer") elseif(params == 'Constructor3') params = '' + d("capacity") elseif(params == 'Constructor4') params = '' + d("col") elseif(params == 'Constructor5') params = '' + d("hashProvider") + ', ' + d("comparer") elseif(params == 'Constructor6') params = '' + d("capacity") + ', ' + d("equalityComparer") elseif(params == 'Constructor7') params = '' + d("capacity") + ', ' + d("col") elseif(params == 'Constructor8') params = '' + d("capacity") + ', ' + d("hashProvider") + ', ' + d("comparer") end sys.add_object(this.codename, 'NameValueCollection', params) // initialize default values if(not isdef("Dictionary")) arr = this.props('Dictionary').value for(i = 0; i < arr.size(); i++) arr2 = split(arr.get(i), '=') blk_init.println(this.codename, '.Add(', arr2.get(0), ', ', arr2.get(1), ');') end end // makes implementation methods for properties sys._prop_init('AllKeys', 1, 0, 0) // makes implementation of methods as properties sys._mtd_as_prop_init('HasKeys()') sys._mtd_as_prop_init('NameValueCollection') // makes implementation of simple methods sys._method_init('Clear') // initialize common events and properties include("NameObjectCollectionBase-init") end func doConstructor() blk.println(this.codename, ' = new NameValueCollection();') end func doConstructor2(equalityComparer) blk.println(this.codename, ' = new NameValueCollection(', d("equalityComparer"), ');') end func doConstructor3(capacity) blk.println(this.codename, ' = new NameValueCollection(', d("capacity"), ');') end func doConstructor4(col) blk.println(this.codename, ' = new NameValueCollection(', d("col"), ');') end func doConstructor5(hashProvider, comparer) blk.println(this.codename, ' = new NameValueCollection(', d("hashProvider"), ', ', d("comparer"), ');') end func doConstructor6(capacity, equalityComparer) blk.println(this.codename, ' = new NameValueCollection(', d("capacity"), ', ', d("equalityComparer"), ');') end func doConstructor7(capacity, col) blk.println(this.codename, ' = new NameValueCollection(', d("capacity"), ', ', d("col"), ');') end func doConstructor8(capacity, hashProvider, comparer) blk.println(this.codename, ' = new NameValueCollection(', d("capacity"), ', ', d("hashProvider"), ', ', d("comparer"), ');') end func doAdd(c) blk.println(this.codename, '.Add(', d("c"), ');') end func doAdd2(name, value) blk.println(this.codename, '.Add(', d("name"), ', ', d("value"), ');') end func doCopyTo(dest, index) blk.println(this.codename, '.CopyTo(', d("dest"), ', ', d("index"), ');') end func doGet(index) if(linked("onGet")) event("onGet", this.codename + '.Get(' + d("index") + ')') else blk.println(this.codename, '.Get(', d("index"), ');') end end func doGet2(name) if(linked("onGet")) event("onGet", this.codename + '.Get(' + d("name") + ')') else blk.println(this.codename, '.Get(', d("name"), ');') end end func doGetKey(index) if(linked("onGetKey")) event("onGetKey", this.codename + '.GetKey(' + d("index") + ')') else blk.println(this.codename, '.GetKey(', d("index"), ');') end end func doGetValues(index) if(linked("onGetValues")) event("onGetValues", this.codename + '.GetValues(' + d("index") + ')') else blk.println(this.codename, '.GetValues(', d("index"), ');') end end func doGetValues2(name) if(linked("onGetValues")) event("onGetValues", this.codename + '.GetValues(' + d("name") + ')') else blk.println(this.codename, '.GetValues(', d("name"), ');') end end func doRemove(name) blk.println(this.codename, '.Remove(', d("name"), ');') end func doSet(name, value) blk.println(this.codename, '.Set(', d("name"), ', ', d("value"), ');') end include("NameObjectCollectionBase")