func init // adds using namespace sys.add_use('System.Net') // initialize instance params = this.props('Constructor').value if(params == 'Constructor') params = '' elseif(params == 'Constructor2') params = '' + d("UserName") + ', ' + d("SecurePassword") elseif(params == 'Constructor3') params = '' + d("UserName") + ', ' + d("Password") elseif(params == 'Constructor4') params = '' + d("UserName") + ', ' + d("SecurePassword") + ', ' + d("Domain") elseif(params == 'Constructor5') params = '' + d("UserName") + ', ' + d("Password") + ', ' + d("Domain") end sys.add_object(this.codename, 'NetworkCredential', params) // initialize properties sys.set_undef_field('Domain') sys.set_undef_field('Password') sys.set_typed_field(20, 'SecurePassword') sys.set_undef_field('UserName') // makes implementation methods for properties sys._prop_init('Domain', 0, 1, 2) sys._prop_init('Password', 0, 1, 2) sys._prop_init('SecurePassword', 0, 1, 0) sys._prop_init('UserName', 0, 1, 2) // makes implementation of methods as properties sys._mtd_as_prop_init('NetworkCredential') end func doConstructor() blk.println(this.codename, ' = new NetworkCredential();') end func doConstructor2(userName, securepassword) blk.println(this.codename, ' = new NetworkCredential(', d("UserName"), ', ', d("SecurePassword"), ');') end func doConstructor3(userName, password) blk.println(this.codename, ' = new NetworkCredential(', d("UserName"), ', ', d("Password"), ');') end func doConstructor4(userName, securepassword, domain) blk.println(this.codename, ' = new NetworkCredential(', d("UserName"), ', ', d("SecurePassword"), ', ', d("Domain"), ');') end func doConstructor5(userName, password, domain) blk.println(this.codename, ' = new NetworkCredential(', d("UserName"), ', ', d("Password"), ', ', d("Domain"), ');') end func doGetCredential(uri, authType) if(linked("onGetCredential")) event("onGetCredential", this.codename + '.GetCredential(' + d("Uri") + ', ' + d("AuthType") + ')') else blk.println(this.codename, '.GetCredential(', d("Uri"), ', ', d("AuthType"), ');') end end func doGetCredential2(host, port, authenticationType) if(linked("onGetCredential")) event("onGetCredential", this.codename + '.GetCredential(' + d("Host") + ', ' + d("Port") + ', ' + d("AuthenticationType") + ')') else blk.println(this.codename, '.GetCredential(', d("Host"), ', ', d("Port"), ', ', d("AuthenticationType"), ');') end end