func init // adds using namespace sys.add_use('System.Security.AccessControl') sys.add_use('System.ComponentModel') // initialize a member if(not isdef('Name')) sys.add_var(this.name, 'FileSystemRights') blk_init.println(this.codename, ' = ', this.FileSystemRights(), ';') end // initialize parser sys._se_init('Parse', 'FileSystemRights', 'FileSystemRights') end func _se_make(value) return('(FileSystemRights)Enum.Parse(typeof(FileSystemRights), ' + d('Value') + ')') end func doMembers() blk.println('foreach (object item in TypeDescriptor.GetConverter(typeof(FileSystemRights)).GetStandardValues()) {').inc() event('onMembers', 'item') blk.dec().println('}') end func FileSystemRights() v = this.props('FileSystemRights').value flags = ((v _and_ 1) ? '|FileSystemRights.ReadData' : '') + ((v _and_ 2) ? '|FileSystemRights.ListDirectory' : '') + ((v _and_ 4) ? '|FileSystemRights.WriteData' : '') + ((v _and_ 8) ? '|FileSystemRights.CreateFiles' : '') + ((v _and_ 16) ? '|FileSystemRights.AppendData' : '') + ((v _and_ 32) ? '|FileSystemRights.CreateDirectories' : '') + ((v _and_ 64) ? '|FileSystemRights.ReadExtendedAttributes' : '') + ((v _and_ 128) ? '|FileSystemRights.WriteExtendedAttributes' : '') + ((v _and_ 256) ? '|FileSystemRights.ExecuteFile' : '') + ((v _and_ 512) ? '|FileSystemRights.Traverse' : '') + ((v _and_ 1024) ? '|FileSystemRights.DeleteSubdirectoriesAndFiles' : '') + ((v _and_ 2048) ? '|FileSystemRights.ReadAttributes' : '') + ((v _and_ 4096) ? '|FileSystemRights.WriteAttributes' : '') + ((v _and_ 8192) ? '|FileSystemRights.Delete' : '') + ((v _and_ 16384) ? '|FileSystemRights.ReadPermissions' : '') + ((v _and_ 32768) ? '|FileSystemRights.ChangePermissions' : '') + ((v _and_ 65536) ? '|FileSystemRights.TakeOwnership' : '') + ((v _and_ 131072) ? '|FileSystemRights.Synchronize' : '') + ((v _and_ 262144) ? '|FileSystemRights.FullControl' : '') + ((v _and_ 524288) ? '|FileSystemRights.Read' : '') + ((v _and_ 1048576) ? '|FileSystemRights.ReadAndExecute' : '') + ((v _and_ 2097152) ? '|FileSystemRights.Write' : '') + ((v _and_ 4194304) ? '|FileSystemRights.Modify' : '') return('(0' + flags + ')') end