예제 #1
0
 private TypeMember(TypeTemplateBase template, DataTable table)
     : base(template.Domain, table)
 {
     this.template = template;
 }
예제 #2
0
        public static async Task <TypeMember> CreateAsync(Authentication authentication, TypeTemplateBase template, DataTable table)
        {
            var domain = template.Domain;
            var tuple  = await domain.DataDispatcher.InvokeAsync(() =>
            {
                var member = new TypeMember(template, table);
                var query  = from DataRow item in table.Rows
                             select item.Field <string>(CremaSchema.Name);

                var newName = NameUtility.GenerateNewName("Member", query);
                return(member, newName);
            });

            await tuple.member.SetFieldAsync(authentication, CremaSchema.Name, tuple.newName);

            return(tuple.member);
        }
예제 #3
0
 public TypeMember(TypeTemplateBase template, DataRow row)
     : base(template.Domain, row)
 {
     this.template = template;
 }