示例#1
0
 public UserDataType(ISchemaBase parent)
     : base(parent, Enums.ObjectType.UserDataType)
 {
     Default = new Default(this);
     Rule = new Rule(this);
     Dependencys = new List<ObjectDependency>();
 }
示例#2
0
 public void Fill(Database database, string connectionString)
 {
     if (database.Options.Ignore.FilterRules)
     {
         using (SqlConnection conn = new SqlConnection(connectionString))
         {
             using (SqlCommand command = new SqlCommand(GetSQL(), conn))
             {
                 conn.Open();
                 using (SqlDataReader reader = command.ExecuteReader())
                 {
                     while (reader.Read())
                     {
                         Rule item = new Rule(database);
                         item.Id = (int)reader["object_id"];
                         item.Name = reader["Name"].ToString();
                         item.Owner = reader["Owner"].ToString();
                         item.Text = reader["Definition"].ToString();
                         database.Rules.Add(item);
                     }
                 }
             }
         }
     }
 }
示例#3
0
 public new 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;
 }
示例#4
0
        /// <summary>
        /// Clona el objeto Column en una nueva instancia.
        /// </summary>
        public override ISchemaBase Clone(ISchemaBase parent)
        {
            var item = new UserDataType(parent)
            {
                Name          = Name,
                Id            = Id,
                Owner         = Owner,
                Guid          = Guid,
                AllowNull     = AllowNull,
                Precision     = Precision,
                Scale         = Scale,
                Size          = Size,
                Type          = Type,
                Default       = Default.Clone(this),
                Rule          = Rule.Clone(this),
                Dependencys   = Dependencys,
                IsAssembly    = IsAssembly,
                AssemblyClass = AssemblyClass,
                AssemblyId    = AssemblyId,
                AssemblyName  = AssemblyName
            };

            return(item);
        }