コード例 #1
0
ファイル: ITableColumnTask.cs プロジェクト: teize001/Crema
 public void SetName(ITableColumn column, TaskContext context)
 {
     column.Dispatcher.Invoke(() =>
     {
         var columnName = RandomUtility.NextIdentifier();
         column.SetName(context.Authentication, columnName);
     });
 }
コード例 #2
0
 private static JsonColumnInfos.ItemInfo InitializeFields(Authentication authentication, JsonColumnInfos.ItemInfo item, ITableColumn column)
 {
     column.SetName(authentication, item.Name);
     column.SetDataType(authentication, item.DataType);
     column.SetComment(authentication, item.Comment);
     column.SetTags(authentication, (TagInfo)item.Tags);
     column.SetIsReadOnly(authentication, item.IsReadOnly);
     column.SetIsUnique(authentication, item.IsUnique);
     column.SetAutoIncrement(authentication, item.AutoIncrement);
     column.SetDefaultValue(authentication, item.DefaultValue);
     column.SetAllowNull(authentication, item.AllowNull);
     return(item);
 }
コード例 #3
0
 private static void SetFields(Authentication authentication, JsonColumnInfos.ItemInfo item, ITableColumn column)
 {
     if (column.Name != item.Name)
     {
         column.SetName(authentication, item.Name);
     }
     if (column.DataType != item.DataType)
     {
         column.SetDataType(authentication, item.DataType);
     }
     if (column.Comment != item.Comment)
     {
         column.SetComment(authentication, item.Comment);
     }
     if (column.Tags != (TagInfo)item.Tags)
     {
         column.SetTags(authentication, (TagInfo)item.Tags);
     }
     if (column.IsReadOnly != item.IsReadOnly)
     {
         column.SetIsReadOnly(authentication, item.IsReadOnly);
     }
     if (column.IsUnique != item.IsUnique)
     {
         column.SetIsUnique(authentication, item.IsUnique);
     }
     if (column.AutoIncrement != item.AutoIncrement)
     {
         column.SetAutoIncrement(authentication, item.AutoIncrement);
     }
     if (column.DefaultValue != item.DefaultValue)
     {
         column.SetDefaultValue(authentication, item.DefaultValue);
     }
     if (column.AllowNull != item.AllowNull)
     {
         column.SetAllowNull(authentication, item.AllowNull);
     }
 }
コード例 #4
0
        public static void SetRandomName(this ITableColumn tableColumn, Authentication authentication)
        {
            var newName = RandomUtility.NextIdentifier();

            tableColumn.SetName(authentication, newName);
        }
コード例 #5
0
 public void SetName()
 {
     column.SetName(authentication, RandomUtility.NextIdentifier());
 }