コード例 #1
0
ファイル: ResourceType.cs プロジェクト: Plankankul/Zenity
        /// <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);
        }
コード例 #2
0
 /// <summary>
 /// Loads the navigation property collection.
 /// </summary>
 /// <param name="navigationProperties">The navigation properties.</param>
 /// <param name="xNavigationProperties">The xml node list with navigation properties information.</param>
 private static void LoadNavigationPropertyCollection(NavigationPropertyCollection navigationProperties, XmlNodeList xNavigationProperties)
 {
     foreach (XmlNode xNavigationProperty in xNavigationProperties)
     {
         NavigationProperty navigationProperty = new NavigationProperty();
         navigationProperties.Add(navigationProperty);
         LoadNavigationProperty(navigationProperty, xNavigationProperty);
     }
 }