Esempio n. 1
0
        protected override void InitFromConfigurationElement(ObjectSchemaConfigurationElementBase schemaConfig)
        {
            base.InitFromConfigurationElement(schemaConfig);

            ObjectSchemaConfigurationElement configElem = (ObjectSchemaConfigurationElement)schemaConfig;

            this.CodeNameKey = configElem.CodeNameKey;
            this.CodeNameValidationMethod = configElem.CodeNameValidationMethod;
            this.FullPathValidationMethod = configElem.FullPathValidationMethod;

            this.IsUsersContainer       = configElem.IsUsersContainer;
            this.IsUsersContainerMember = configElem.IsUsersContainerMember;
            this.ToSchemaObjectSnapshot = configElem.ToSchemaObjectSnapshot;

            SchemaPropertyGroupSettings groupSettings = SchemaPropertyGroupSettings.GetConfig();

            foreach (ObjectSchemaClassConfigurationElement schemaClass in configElem.Groups)
            {
                if (groupSettings.Groups.ContainsKey(schemaClass.GroupName))
                {
                    this.Properties.AppendPropertiesFromConfiguration(groupSettings.Groups[schemaClass.GroupName].AllProperties);
                }
            }

            this.Operations.LoadFromConfiguration(configElem.Operations);

            this.PermissionSet.LoadFromConfiguration(configElem.PermissionSet);
        }
Esempio n. 2
0
        /// <summary>
        /// 从配置元素初始化
        /// </summary>
        /// <param name="schemaConfig"></param>
        protected virtual void InitFromConfigurationElement(ObjectSchemaConfigurationElementBase schemaConfig)
        {
            schemaConfig.NullCheck("schemaConfig");

            this.Name          = schemaConfig.Name;
            this.TableName     = schemaConfig.TableName;
            this.SnapshotTable = schemaConfig.SnapshotTable;
            this.Category      = schemaConfig.Category;

            this.SortOrder  = schemaConfig.SortOrder;
            this.IsRelation = schemaConfig.IsRelation;

            this.Tabs.LoadFromConfiguration(schemaConfig.Tabs);
        }