• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ColumnType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ColumnType的典型用法代码示例。如果您正苦于以下问题:C# ColumnType类的具体用法?C# ColumnType怎么用?C# ColumnType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ColumnType类属于命名空间,在下文中一共展示了ColumnType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetNativeSqlType

        public override string GetNativeSqlType(ColumnType type)
        {
            switch (type)
            {
                case ColumnType.ID:
                    return "integer primary key autoincrement";

                case ColumnType.ForeignKey:
                case ColumnType.Integer:
                    return "integer";

                case ColumnType.String:
                    return "text";

                case ColumnType.Bool:
                    return "bool";

                case ColumnType.Timestamp:
                    return "timestamp";

                case ColumnType.Date:
                    return "date";

                case ColumnType.Double:
                    return "double";

                default:
                    return null;
            }
        }
开发者ID:zippy1981,项目名称:GTools,代码行数:30,代码来源:Database.cs


示例2: Format_DBNullValue_NullDisplay

 public void Format_DBNullValue_NullDisplay(ColumnType columnType)
 {
     var factory = new CellFormatterFactory();
     var formatter = factory.GetObject(columnType);
     var text = formatter.Format(DBNull.Value);
     Assert.That(text, Is.EqualTo("(null)"));
 }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:7,代码来源:CellFormatterTest.cs


示例3: ColumnSchema

 /// <summary>
 /// Explicit constructor for a foreign key
 /// </summary>
 /// <param name="name">Name of the column</param>
 /// <param name="type">Type of the column</param>
 public ColumnSchema(string name, ColumnType type, string tableName, string columnName, string comment)
 {
     Name = name;
     Type = type;
     Reference = string.Format("{0}.{1}", tableName, columnName);
     Comment = comment;
 }
开发者ID:k4gdw,项目名称:GSharpTools,代码行数:12,代码来源:ColumnSchema.cs


示例4: Column

 /// <summary>
 /// Initializes a new instance of the <see cref="Column" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="title">The title.</param>
 /// <param name="type">The type.</param>
 /// <param name="pk">if set to <c>true</c> the column is a primary key.</param>
 public Column(string name, string title = null, ColumnType type = ColumnType.Text, bool pk = false)
 {
     this.Name = name;
     this.Title = (title == null) ? name : title;
     this.Type = type;
     this.PrimaryKey = pk;
 }
开发者ID:wwwiiilll,项目名称:CRUDTable,代码行数:14,代码来源:Column.cs


示例5: ColumnTypeToString

 public static string ColumnTypeToString(ColumnType ct)
 {
     switch (ct){
         case ColumnType.Boolean:
             return "C";
         case ColumnType.Categorical:
             return "C";
         case ColumnType.Color:
             return "C";
         case ColumnType.DateTime:
             return "T";
         case ColumnType.DashStyle:
             return "C";
         case ColumnType.Integer:
             return "N";
         case ColumnType.MultiInteger:
             return "M";
         case ColumnType.MultiNumeric:
             return "M";
         case ColumnType.Numeric:
             return "N";
         case ColumnType.Text:
             return "T";
         default:
             return "T";
     }
 }
开发者ID:JurgenCox,项目名称:compbio-base,代码行数:27,代码来源:TableModelImpl.cs


示例6: ColumnMappingField

 public ColumnMappingField(FieldInfo field, ColumnAttribute attribute)
 {
     this._Field = field;
     this._ColumnName = string.IsNullOrEmpty(attribute.ColumnName) ? field.Name : attribute.ColumnName;
     this._ColumnType = attribute.ColumnType;
     this._ColumnId = attribute.ColumnId;
 }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:7,代码来源:ColumnMappingField.cs


示例7: FilterIncrementallyWith

		/// <summary>
		/// Filter items in ImageListView incrementally. 
		/// This method optimizes on-the-fly filtering as user types in a search box.
		/// </summary>
		/// <param name="key">An item is visible only if it contains this string</param>
		private void FilterIncrementallyWith(string key, ColumnType attrType)
		{
			if (key.Length == mLastSearch.Length) return;

			if (mVisibleItems == null)
			{
				mVisibleItems = new LinkedList<ImageListViewItem>(mItems);
				mInvisibleItems = new LinkedList<ImageListViewItem>();
			}
			if (key.Length > mLastSearch.Length)
			{
				ToggleMatchedItems(mVisibleItems, mInvisibleItems, false, key, attrType);
			}
			else if (key.Length < mLastSearch.Length)
			{
				ToggleMatchedItems(mInvisibleItems, mVisibleItems, true, key, attrType);
			}
			mImageListView.Items.Clear(false);
			mImageListView.SuspendLayout();
			foreach (ImageListViewItem item in mVisibleItems)
			{
				mImageListView.Items.Add(item, mAdaptor);
			}
			mImageListView.ResumeLayout();
			mLastSearch = key;
		}
开发者ID:ericpony,项目名称:comic-gallery,代码行数:31,代码来源:ImageListViewFilter.cs


示例8: TableInfo

 public TableInfo(string name, string primaryKeyName, ColumnType? primaryKeyType, short? primaryKeySize)
 {
     Name = name;
       PrimaryKeyName = primaryKeyName;
       PrimaryKeyType = primaryKeyType;
       PrimaryKeySize = primaryKeySize;
 }
开发者ID:simonlaroche,项目名称:machine,代码行数:7,代码来源:TableInfo.cs


示例9: Create

        public static ColumnParser Create(ColumnType type, string format)
        {
            switch (type)
            {
                case ColumnType.Logger:
                    return new LoggerParser();

                case ColumnType.Level:
                    return new LevelParser();

                case ColumnType.Timestamp:
                    return new TimestampParser(format);

                case ColumnType.Thread:
                    return new ThreadParser();

                case ColumnType.Line:
                    return new LineParser();

                case ColumnType.Newline:
                    return new NewlineParser();

                case ColumnType.Message:
                    return new MessageParser();

                case ColumnType.Date:
                    return new DateParser(format, DateTimeKind.Local);

                case ColumnType.UtcDate:
                    return new DateParser(format, DateTimeKind.Utc);

                default:
                    throw new KeyNotFoundException(string.Format("Unable to find a parser for '{0}'", type));
            }
        }
开发者ID:Kittyfisto,项目名称:Tailviewer,代码行数:35,代码来源:ColumnParser.cs


示例10: ColumnData

 public ColumnData(String name, ColumnType type, String comparison, String method)
 {
     Name = name;
     Type = type;
     Comparison = comparison;
     TimingMethod = method;
 }
开发者ID:Gyoo,项目名称:LiveSplit.Splits,代码行数:7,代码来源:ColumnData.cs


示例11: AddColumn

 public void AddColumn(string colName, int width, ColumnType columnType, string description, bool persistent)
 {
     AddColumn(colName, width, columnType, description);
     if (persistent){
         AddPersistentColumn(colName, width, columnType, description, null);
     }
 }
开发者ID:JurgenCox,项目名称:compbio-base,代码行数:7,代码来源:VirtualDataTable2.cs


示例12: ValuedExpression

 public ValuedExpression(string expression, object value, ColumnType type, string tolerance)
     : base(expression)
 {
     Value = value;
     Type = type;
     Tolerance = tolerance;
 }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:7,代码来源:ValuedExpression.cs


示例13: FilterWith

		/// <summary>
		/// Filter out items in ImageListView according to given criterion.
		/// </summary>
		/// <param name="key">An item is visible only if it contains this string</param>
		internal void FilterWith(string key, ColumnType attrType)
		{
			if (mItems == null)
			{
				throw new InvalidOperationException("Method Snapshot() should be called before the first search.");
			}
			mImageListView.Items.Clear(false);
			if (key.Length == 0) // reset items
			{
				mImageListView.Items.AddRange(mItems, mAdaptor);
			}
			else
			{
				string uKey = key.ToUpperInvariant();
				mImageListView.SuspendLayout();
				foreach (ImageListViewItem item in mItems)
				{
					Boolean isMatched = false;
					switch (attrType)
					{
						case ColumnType.Name:
							isMatched = item.Text.Contains(uKey); break;
						default:
							throw new NotImplementedException();
					}
					if (isMatched) mImageListView.Items.Add(item, mAdaptor);
				}
				mImageListView.ResumeLayout();
			}
			mLastSearch = key;
		}
开发者ID:ericpony,项目名称:comic-gallery,代码行数:35,代码来源:ImageListViewFilter.cs


示例14: ColumnDefinition

 /// <summary>
 ///     The column definition.
 /// </summary>
 /// <param name="theName">The name of the column.</param>
 /// <param name="theDataType">The type of the column.</param>
 public ColumnDefinition(String theName, ColumnType theDataType)
 {
     Name = theName;
     DataType = theDataType;
     Count = -1;
     Low = High = Mean = Sd = Double.NaN;
 }
开发者ID:johannsutherland,项目名称:encog-dotnet-core,代码行数:12,代码来源:ColumnDefinition.cs


示例15: ColumnMappingProperty

 public ColumnMappingProperty(PropertyInfo Property, ColumnAttribute attribute)
 {
     this._Property = Property;
     this._ColumnName = string.IsNullOrEmpty(attribute.ColumnName) ? Property.Name : attribute.ColumnName;
     this._ColumnType = attribute.ColumnType;
     this._ColumnId = attribute.ColumnId;
 }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:7,代码来源:ColumnMappingProperty.cs


示例16: ColumnAttribute

 public ColumnAttribute(ColumnType type)
 {
     switch (type)
     {
         case ColumnType.IncrementPrimary:
             ParameterDirection = ParameterDirection.InputOutput;
             IsUnique = IsPrimaryKey = IsIncrement = true;
             break;
         case ColumnType.Primary:
             ParameterDirection = ParameterDirection.Input;
             IsUnique = IsPrimaryKey = true;
             break;
         case ColumnType.Unique:
             ParameterDirection = ParameterDirection.Input;
             IsUnique = true;
             break;
         case ColumnType.Nullable:
             IsNullable = true;
             ParameterDirection = ParameterDirection.Input;
             break;
         default:
             ParameterDirection = ParameterDirection.Input;
             break;
     }
 }
开发者ID:eicrosoft,项目名称:VipSoft,代码行数:25,代码来源:Attribute.cs


示例17: DataTypeItem

 public DataTypeItem(DataType dataType, ColumnType[] allowedColumns)
 {
   eX4XcIhHpDXt70u2x3N.k8isAcYzkUOGF();
   // ISSUE: explicit constructor call
   base.\u002Ector();
   this.mjxdnU89b0 = dataType;
   this.Awnd7GaIPh = new ArrayList((ICollection) allowedColumns);
 }
开发者ID:heber,项目名称:FreeOQ,代码行数:8,代码来源:DataTypeItem.cs


示例18: AddColumn

        public void AddColumn(string tableName, string columnName, ColumnType columnType)
        {
            var tableForInsert = getTable(tableName);
            if (hasColumn(tableForInsert, columnName))
                throw new ZException("Table [{0}] already contains column with specified name: {1}.", tableName, columnName);

            tableForInsert.Columns.Add(new Column(columnName, columnType));
        }
开发者ID:ZeroByte1987,项目名称:ConsoleGames,代码行数:8,代码来源:ZDataBase.cs


示例19: ColumnDefinitionPayload

 private ColumnDefinitionPayload(string name, CharacterSet characterSet, int columnLength, ColumnType columnType, ColumnFlags columnFlags)
 {
     Name = name;
     CharacterSet = characterSet;
     ColumnLength = columnLength;
     ColumnType = columnType;
     ColumnFlags = columnFlags;
 }
开发者ID:yaozhenfa,项目名称:MySqlConnector,代码行数:8,代码来源:ColumnDefinitionPayload.cs


示例20: Column

 public Column()
 {
   eX4XcIhHpDXt70u2x3N.k8isAcYzkUOGF();
   // ISSUE: explicit constructor call
   base.\u002Ector();
   this.aBGgvFVujA = ColumnType.Skipped;
   this.NrkgoRFju2 = "";
 }
开发者ID:heber,项目名称:FreeOQ,代码行数:8,代码来源:Column.cs



注:本文中的ColumnType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ColumnTypes类代码示例发布时间:2022-05-24
下一篇:
C# ColumnSchema类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap