本文整理汇总了C#中ColumnProperty类的典型用法代码示例。如果您正苦于以下问题:C# ColumnProperty类的具体用法?C# ColumnProperty怎么用?C# ColumnProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ColumnProperty类属于命名空间,在下文中一共展示了ColumnProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Column
public Column(string name, DbType type, ColumnProperty property, string collation)
{
Name = name;
Type = type;
ColumnProperty = property;
Collation = collation;
}
示例2: Column
public Column(string name, DbType type, int size, ColumnProperty property)
{
Name = name;
Type = type;
Size = size;
ColumnProperty = property;
}
示例3: GetColumnNames
/// <summary>
/// Method to get the column names
/// </summary>
/// <param name="mapItemCollection"></param>
/// <param name="propertyToFetch"></param>
/// <returns></returns>
public string GetColumnNames(ColumnMapItemCollection mapItemCollection, ColumnProperty propertyToFetch)
{
if (mapItemCollection == null) { throw new ArgumentNullException("mapItemCollection"); }
if (mapItemCollection.Count <= 0) { throw new ArgumentOutOfRangeException("mapItemCollection"); }
StringBuilder builder = new StringBuilder();
switch (propertyToFetch)
{
case ColumnProperty.Source:
foreach (ColumnMapItem columnMapItem in mapItemCollection)
{
builder.AppendFormat("{0},", columnMapItem.SourceColumn);
}
break;
case ColumnProperty.Destination:
foreach (ColumnMapItem columnMapItem in mapItemCollection)
{
builder.AppendFormat("{0},", columnMapItem.DestinationColumn);
}
break;
default:
builder.Append(",");
break;
}
return builder.ToString().Substring(0, builder.Length - 1);
}
示例4: Column
public Column(string name, ColumnType type, ColumnProperty property = ColumnProperty.None, object defaultValue = null)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentNullException("name");
}
if (type == null)
{
throw new ArgumentNullException("type");
}
Name = name;
ColumnType = type;
ColumnProperty = property;
DefaultValue = defaultValue;
}
示例5: RegisterProperty
public void RegisterProperty(ColumnProperty property, string sql)
{
if (! propertyMap.ContainsKey(property))
{
propertyMap.Add(property, sql);
}
propertyMap[property] = sql;
}
示例6: IsSelected
public static bool IsSelected(this ColumnProperty property, ColumnProperty test)
{
return (property & test) == test;
}
示例7: HasProperty
/// <summary>
/// Проверяет, выбрано ли заданное свойство
/// </summary>
/// <param name="source"></param>
/// <param name="comparison"></param>
/// <returns></returns>
public static bool HasProperty(this ColumnProperty source, ColumnProperty comparison)
{
return (source & comparison) == comparison;
}
示例8: RemoveProperty
/// <summary>
/// Removes column property.
/// </summary>
/// <param name="property">The column property.</param>
/// <returns>column instance.</returns>
public Column RemoveProperty(ColumnProperty property)
{
ColumnProperties &= ~property;
return this;
}
示例9: Clear
public static ColumnProperty Clear(this ColumnProperty fruits, ColumnProperty flags)
{
return fruits & (~flags);
}
示例10: WithProperty
public SchemaBuilder WithProperty(ColumnProperty columnProperty)
{
_currentColumn.ColumnProperty = columnProperty;
return this;
}
示例11: PropertySelected
public static bool PropertySelected(ColumnProperty source, ColumnProperty comparison)
{
return (source & comparison) == comparison;
}
示例12: AddColumn
public void AddColumn(string table, string column, DbType type, ColumnProperty property)
{
_sqlServerTransformationProvider.AddColumn(table, column, type, property);
}
示例13: AddColumn
/// <summary>
/// Add a new column to an existing table.
/// </summary>
/// <param name="table">Table to which to add the column</param>
/// <param name="column">Column name</param>
/// <param name="type">Date type of the column</param>
/// <param name="size">Max length of the column</param>
/// <param name="property">Properties of the column, see <see cref="ColumnProperty">ColumnProperty</see>,</param>
/// <param name="defaultValue">Default value</param>
public virtual void AddColumn(string table, string column, DbType type, int size, ColumnProperty property,
object defaultValue)
{
ColumnPropertiesMapper mapper =
_dialect.GetAndMapColumnProperties(new Column(column, type, size, property, defaultValue));
AddColumn(table, mapper.ColumnSql);
}
示例14: Match
public static bool Match(this ColumnProperty prop, ColumnProperty compare)
{
return (prop & compare) == compare;
}
示例15: AddProperty
private void AddProperty(ColumnProperty property, bool value)
{
if (value)
{
AddProperty(property);
}
}