本文整理汇总了C#中ISchemaBase类的典型用法代码示例。如果您正苦于以下问题:C# ISchemaBase类的具体用法?C# ISchemaBase怎么用?C# ISchemaBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISchemaBase类属于命名空间,在下文中一共展示了ISchemaBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FormatAlter
public static string FormatAlter(string ObjectType, string body, ISchemaBase item, Boolean quitSchemaBinding)
{
string prevText = null;
try
{
prevText = (string)body.Clone();
SearchItem sitem = FindCreate(ObjectType, item, prevText);
Regex regAlter = new Regex("CREATE");
if (!quitSchemaBinding)
return regAlter.Replace(sitem.Body, "ALTER", 1, sitem.FindPosition);
//return prevText.Substring(0, iFind) + "ALTER " + sitem.ObjectType + " " + prevText.Substring(iFind + sitem.ObjectType.Length + 7, prevText.Length - (iFind + sitem.ObjectType.Length + 7)).TrimStart();
else
{
string text = regAlter.Replace(sitem.Body, "ALTER", 1, sitem.FindPosition);
Regex regex = new Regex("WITH SCHEMABINDING", RegexOptions.IgnoreCase);
return regex.Replace(text, "");
}
//return "";
}
catch
{
return prevText;
}
}
示例2: CLRFunction
public CLRFunction(ISchemaBase parent)
: base(parent, Enums.ObjectType.CLRFunction, Enums.ScripActionType.AddFunction, Enums.ScripActionType.DropFunction)
{
parameters = new List<Parameter>();
returnType = new Parameter();
isAggrFunc = false;
}
示例3: Clone
public override ISchemaBase Clone(ISchemaBase parent)
{
Index index = new Index(parent)
{
AllowPageLocks = this.AllowPageLocks,
AllowRowLocks = this.AllowRowLocks,
Columns = this.Columns.Clone(),
FillFactor = this.FillFactor,
FileGroup = this.FileGroup,
Id = this.Id,
IgnoreDupKey = this.IgnoreDupKey,
IsAutoStatistics = this.IsAutoStatistics,
IsDisabled = this.IsDisabled,
IsPadded = this.IsPadded,
IsPrimaryKey = this.IsPrimaryKey,
IsUniqueKey = this.IsUniqueKey,
Name = this.Name,
SortInTempDb = this.SortInTempDb,
Status = this.Status,
Type = this.Type,
Owner = this.Owner,
FilterDefintion = this.FilterDefintion
};
ExtendedProperties.ForEach(item => index.ExtendedProperties.Add(item));
return index;
}
示例4: AssemblyFile
public AssemblyFile(ISchemaBase parent, AssemblyFile assemblyFile, Enums.ObjectStatusType status)
: base(parent, Enums.ObjectType.AssemblyFile)
{
this.Name = assemblyFile.Name;
this.content = assemblyFile.content;
this.Status = status;
}
示例5: View
public View(ISchemaBase parent)
: base(parent, Enums.ObjectType.View, Enums.ScripActionType.AddView, Enums.ScripActionType.DropView)
{
Indexes = new SchemaList<Index, View>(this, ((Database)parent).AllObjects);
Triggers = new SchemaList<Trigger, View>(this, ((Database)parent).AllObjects);
CLRTriggers = new SchemaList<CLRTrigger, View>(this, ((Database)parent).AllObjects);
}
示例6: UserDataType
public UserDataType(ISchemaBase parent)
: base(parent, Enums.ObjectType.UserDataType)
{
Default = new Default(this);
Rule = new Rule(this);
Dependencys = new List<ObjectDependency>();
}
示例7: Clone
/// <summary>
/// Clona el objeto en una nueva instancia.
/// </summary>
public override ISchemaBase Clone(ISchemaBase parent)
{
TableOption option = new TableOption(parent);
option.Name = this.Name;
option.Status = this.Status;
option.Value = this.Value;
return option;
}
示例8: Clone
public new Default Clone(ISchemaBase parent)
{
Default item = new Default(parent);
item.Id = this.Id;
item.Name = this.Name;
item.Owner = this.Owner;
item.Value = this.Value;
return item;
}
示例9: Clone
public override ISchemaBase Clone(ISchemaBase parent)
{
Synonym item = new Synonym(parent);
item.Id = this.Id;
item.Name = this.Name;
item.Owner = this.Owner;
item.Value = this.Value;
item.Guid = this.Guid;
return item;
}
示例10: Clone
public Rule Clone(ISchemaBase parent)
{
Rule item = new Rule(parent);
item.Id = this.Id;
item.Name = this.Name;
item.Owner = this.Owner;
item.Text = this.Text;
item.Guid = this.Guid;
return item;
}
示例11: SqlAction
public SqlAction(ISchemaBase item)
{
if ((item.ObjectType == Enums.ObjectType.Column) || (item.ObjectType == Enums.ObjectType.Index) || (item.ObjectType == Enums.ObjectType.Constraint))
this.name = item.Name;
else
this.name = item.FullName;
this.action = item.Status;
this.type = item.ObjectType;
childs = new List<SqlAction>();
}
示例12: Clone
/// <summary>
/// Clona el objeto en una nueva instancia.
/// </summary>
public override ISchemaBase Clone(ISchemaBase parent)
{
StoreProcedure item = new StoreProcedure(parent);
item.Text = this.Text;
item.Status = this.Status;
item.Name = this.Name;
item.Id = this.Id;
item.Owner = this.Owner;
item.Guid = this.Guid;
return item;
}
示例13: Clone
public override ISchemaBase Clone(ISchemaBase parent)
{
FileGroup file = new FileGroup(parent);
file.IsDefaultFileGroup = this.IsDefaultFileGroup;
file.IsReadOnly = this.IsReadOnly;
file.Name = this.Name;
file.Id = this.Id;
file.Files = this.Files.Clone(file);
file.Guid = this.Guid;
file.IsFileStream = this.IsFileStream;
return file;
}
示例14: Clone
/// <summary>
/// Clona el objeto en una nueva instancia.
/// </summary>
public new XMLSchema Clone(ISchemaBase parent)
{
XMLSchema item = new XMLSchema(parent);
item.Text = this.Text;
item.Status = this.Status;
item.Name = this.Name;
item.Id = this.Id;
item.Owner = this.Owner;
item.Guid = this.Guid;
item.Dependencys = this.Dependencys;
return item;
}
示例15: Clone
public new PartitionFunction Clone(ISchemaBase parent)
{
PartitionFunction item = new PartitionFunction(parent);
item.Id = this.Id;
item.IsBoundaryRight = this.IsBoundaryRight;
item.Name = this.Name;
item.Precision = this.Precision;
item.Scale = this.Scale;
item.Size = this.Size;
item.Type = this.Type;
this.Values.ForEach(value => { item.Values.Add(value); });
return item;
}