コード例 #1
0
        public LayersConfig(GenieLampConfig owner, XmlNode node)
            : base()
        {
            XmlNodeList nodeList = owner.Lamp.QueryNode(node, "./{0}:Layer");

            foreach (XmlNode layerNode in nodeList)
            {
                LayerConfig layer = new LayerConfig(owner, layerNode);
                if (layer.FullName.Equals(PersistenceLayerConfig.LayerName, StringComparison.InvariantCultureIgnoreCase))
                {
                    persistenceConfig = new PersistenceLayerConfig(owner, layerNode);
                }
                else if (layer.FullName.Equals(DomainLayerConfig.LayerName, StringComparison.InvariantCultureIgnoreCase))
                {
                    domainConfig = new DomainLayerConfig(owner, layerNode);
                }
                else if (layer.FullName.Equals(ServicesLayerConfig.LayerName, StringComparison.InvariantCultureIgnoreCase))
                {
                    servicesConfig = new ServicesLayerConfig(owner, layerNode);
                }
                this.Add(layer.FullName, layer);
            }

            if (persistenceConfig == null)
            {
                owner.Lamp.Logger.Warning(WarningLevel.Medium, "Persistent layer configuration was not found");
                persistenceConfig = new PersistenceLayerConfig(owner);
            }
            if (domainConfig == null)
            {
                owner.Lamp.Logger.Warning(WarningLevel.Medium, "Domain layer configuration was not found");
                domainConfig = new DomainLayerConfig(owner);
            }
            if (servicesConfig == null)
            {
                owner.Lamp.Logger.Warning(WarningLevel.Medium, "Services layer configuration was not found");
                servicesConfig = new ServicesLayerConfig(owner);
            }
        }
コード例 #2
0
 public DomainLayerMethods(DomainLayerConfig owner)
 {
     this.owner = owner;
 }