func init // adds using namespace sys.add_use('System.Net.Mail') // initialize instance params = this.props('Constructor').value if(params == 'Constructor') params = '' + d("FileName") elseif(params == 'Constructor2') params = '' + d("contentStream") + ', ' + sys.get_undef_manager("ContentType") elseif(params == 'Constructor3') params = '' + d("contentStream") + ', ' + d("NameMIME") elseif(params == 'Constructor4') params = '' + d("FileName") + ', ' + sys.get_undef_manager("ContentType") elseif(params == 'Constructor5') params = '' + d("FileName") + ', ' + d("mediaType") elseif(params == 'Constructor6') params = '' + d("contentStream") + ', ' + d("NameMIME") + ', ' + d("mediaType") end blk_init.println('try {').inc() sys.add_object(this.codename, 'Attachment', params) blk_init.dec().println('} catch {};') // initialize properties sys.set_typed_field(20, 'NameEncoding') sys.set_typed_field(2, 'Name', 'NameMIME') // makes implementation methods for properties sys._prop_init('ContentDisposition', 1, 0, 0) sys._prop_init('Name', 1, 0, 2) sys._prop_init('NameEncoding', 1, 1, 0) // makes implementation of methods as properties sys._mtd_as_prop_init('Attachment') // initialize common events and properties include("AttachmentBase-init") end func doConstructor(fileName) blk.println(this.codename, ' = new Attachment(', d("FileName"), ');') this.init_fields() end func doConstructor2(contentStream, contenttype) blk.println(this.codename, ' = new Attachment(', d("contentStream"), ', ', sys.get_undef_manager("ContentType"), ');') this.init_fields() end func doConstructor3(contentStream, namemime) blk.println(this.codename, ' = new Attachment(', d("contentStream"), ', ', d("NameMIME"), ');') this.init_fields() end func doConstructor4(fileName, contenttype) blk.println(this.codename, ' = new Attachment(', d("FileName"), ', ', sys.get_undef_manager("ContentType"), ');') this.init_fields() end func doConstructor5(fileName, mediaType) blk.println(this.codename, ' = new Attachment(', d("FileName"), ', ', d("mediaType"), ');') this.init_fields() end func doConstructor6(contentStream, namemime, mediaType) blk.println(this.codename, ' = new Attachment(', d("contentStream"), ', ', d("NameMIME"), ', ', d("mediaType"), ');') this.init_fields() end func doCreateFromString(content, contenttype) blk.println(this.codename, ' = Attachment.CreateAttachmentFromString(', d("content"), ', ', sys.get_undef_manager("ContentType"), ');') this.init_fields() end func doCreateFromString2(content, namemime) blk.println(this.codename, ' = Attachment.CreateAttachmentFromString(', d("content"), ', ', d("NameMIME"), ');') this.init_fields() end func doCreateFromString3(content, namemime, contentEncoding, mediaType) blk.println(this.codename, ' = Attachment.CreateAttachmentFromString(', d("content"), ', ', d("NameMIME"), ', ', d("contentEncoding"), ', ', d("mediaType"), ');') this.init_fields() end func init_fields() // initialize properties sys.set_typed_field(2, 'Name', 'NameMIME', '', blk) sys.set_typed_field(20, 'NameEncoding', '', '', blk) end include("AttachmentBase")