func init // add using module sys.add_use('System.Collections.Generic') // initialize instance if(not isdef("Dictionary")) arr = this.props('Dictionary').value for(i = 0; i < arr.size(); i++) item = arr.get(i) arr2 = split(item, '=') s = '{' + arr2.get(0) + ', ' + arr2.get(1) + '}' arr.get(i) = s end blk_vars.println('private Dictionary ' + this.codename + ';') blk_init.println(this.codename, ' = new Dictionary { ', arr.join(', '), ' };') else sys.add_object(this.codename, 'Dictionary') end // makes implementation methods for properties sys._prop_init('Comparer', 1, 0, 0) sys._prop_init('Count', 1, 0, 1) sys._prop_init('Keys', 1, 0, 0) sys._prop_init('Values', 1, 0, 0) // makes implementation of methods as properties sys._mtd_as_prop_init('GetEnumerator()') sys._mtd_as_prop_init('Dictionary') // makes implementation of simple methods sys._method_init('Clear') end func doAdd(data) blk.println(this.codename, '.Add(', d("Key"), ', ', d("Value"), ');') end func doContainsKey(data) event("onContainsKey", this.codename + '.ContainsKey(' + d("Key") + ')') end func doContainsValue(data) event("onContainsValue", this.codename + '.ContainsValue(' + d("Value") + ')') end func doGetItem(data) event("onGetItem", this.codename && '[' && d("Key") && ']') end func doRemove(data) blk.println(this.codename, '.Remove(', d("Key"), ');') end func doItem(data) blk.println(this.codename, '[', d("Key"), '] = ', d("Value"), ';') end func Item(data) return(this.codename && '[' && d("Key") && ']') end