Beispiel #1
0
        /// <summary>
        /// Instantiates a new ResourceType.
        /// </summary>
        /// <param name="name">Name of resource type.</param>
        /// <param name="baseType">Fully qualified name of the base type.</param>
        public ResourceType(string name, ResourceType baseType)
        {
            this.id       = Guid.NewGuid();
            this.name     = name;
            this.baseType = baseType;

            scalarProperties     = new ScalarPropertyCollection(this);
            navigationProperties = new NavigationPropertyCollection(this);
        }
Beispiel #2
0
 /// <summary>
 /// Loads the scalar property collection.
 /// </summary>
 /// <param name="scalarProperties">The scalar properties.</param>
 /// <param name="xScalarProperties">The xml node list with scalar properties information.</param>
 private static void LoadScalarPropertyCollection(ScalarPropertyCollection scalarProperties, XmlNodeList xScalarProperties)
 {
     foreach (XmlNode xScalarProperty in xScalarProperties)
     {
         ScalarProperty scalarProperty = new ScalarProperty();
         scalarProperties.Add(scalarProperty);
         LoadScalarProperty(scalarProperty, xScalarProperty);
     }
 }