Пример #1
0
 /// <summary>
 /// Creates a new Property object and sets the values.
 /// </summary>
 /// <param name="parent">The mapping tree object, to which the property is assigned.</param>
 /// <param name="name">The Property name.</param>
 /// <param name="type">The type of the Property.</param>
 /// <param name="value">The Property value.</param>
 public Property(MappingNode parent, string name, string type, string value)
     : base(parent)
 {
     this.name  = name;
     this.type  = type;
     this.value = value;
 }
Пример #2
0
 /// <summary>
 /// Creates a Property object.
 /// </summary>
 /// <param name="parent"></param>
 public Property(MappingNode parent)
     : base(parent)
 {
     name  = "";
     value = "";
     type  = "System.String, mscorlib";
 }
Пример #3
0
 /// <summary>
 /// Constructs a Column element and assigns it to the given parent.
 /// </summary>
 /// <param name="parent">The parent object.</param>
 public Column(MappingNode parent)
     : base(parent)
 {
     size                  = 0;
     precision             = 0;
     ignoreColumnSizeInDDL = false;
     allowDbNull           = true;
 }
Пример #4
0
 internal Property(XmlNode propertyNode, MappingNode parent)
     : base(parent)
 {
     this.name  = propertyNode.Attributes["Name"].Value;
     this.value = propertyNode.Attributes["Value"].Value;
     if (propertyNode.Attributes["DotNetType"] == null)
     {
         this.type = "System.String, mscorlib";
     }
     else
     {
         this.type = propertyNode.Attributes["DotNetType"].Value;
     }
 }
Пример #5
0
 /// <summary>
 /// Constructs a MappingNode
 /// </summary>
 /// <param name="node"></param>
 /// <param name="parent"></param>
 public MappingNode(XmlNode node, MappingNode parent)
 {
     this.nodeParent = parent;
     LoadProperties(node);
 }
Пример #6
0
 /// <summary>
 /// Constructs a MappingNode
 /// </summary>
 /// <param name="parent"></param>
 public MappingNode(MappingNode parent)
 {
     this.nodeParent = parent;
 }
Пример #7
0
        //public MappingNode()
        //{
        //}

        internal void SetParent(MappingNode newParent)
        {
            this.nodeParent = newParent;
        }
Пример #8
0
        internal Column(XmlNode columnNode, MappingNode parent)
            : base(columnNode, parent)
        {
            if (null != columnNode.Attributes["Name"])
            {
                this.name = columnNode.Attributes["Name"].Value;
            }
            else
            {
                this.name = null;
            }

            if (null != columnNode.Attributes["NetType"])
            {
                this.netType = columnNode.Attributes["NetType"].Value;
            }
            else
            {
                this.netType = null;
            }

            if (null != columnNode.Attributes["DbType"])
            {
                this.dbType = columnNode.Attributes["DbType"].Value;
            }
            else
            {
                this.dbType = null;
            }

            if (null != columnNode.Attributes["Size"])
            {
                this.size = int.Parse(columnNode.Attributes["Size"].Value);
            }
            else
            {
                this.size = 0;
            }

            if (null != columnNode.Attributes["Precision"])
            {
                this.precision = int.Parse(columnNode.Attributes["Precision"].Value);
            }
            else
            {
                this.precision = 0;
            }

            if (null != columnNode.Attributes["IgnoreColumnSizeInDDL"])
            {
                ignoreColumnSizeInDDL = bool.Parse(columnNode.Attributes["IgnoreColumnSizeInDDL"].Value);
            }
            else
            {
                ignoreColumnSizeInDDL = false;
            }

            if (null != columnNode.Attributes["AllowDbNull"])
            {
                this.allowDbNull = bool.Parse(columnNode.Attributes["AllowDbNull"].Value);
            }
            else
            {
                this.allowDbNull = true;
            }
        }
Пример #9
0
 internal ForeignKeyColumn(XmlNode columnNode, MappingNode parent)
     : base(columnNode, parent)
 {
 }
Пример #10
0
 /// <summary>
 /// Constructs a Column element and assigns it to the given parent.
 /// </summary>
 /// <param name="parent">The parent object.</param>
 public ForeignKeyColumn(MappingNode parent)
     : base(parent)
 {
 }