Ejemplo n.º 1
0
 /// <summary>
 /// 初始化<c> RegularConfigSource </ c>类的新实例.
 /// </summary>
 public RegularConfigSource()
 {
     config             = new OFoodsConfigSection();
     config.Application = new ApplicationElement();
     config.Exceptions  = new ExceptionElementCollection();
     config.Generators  = new GeneratorElement();
     config.Generators.IdentityGenerator = new IdentityGeneratorElement();
     config.Generators.SequenceGenerator = new SequenceGeneratorElement();
     config.Handlers                       = new HandlerElementCollection();
     config.ObjectContainer                = new ObjectContainerElement();
     config.Serializers                    = new SerializerElement();
     config.Serializers.EventSerializer    = new EventSerializerElement();
     config.Serializers.SnapshotSerializer = new SnapshotSerializerElement();
     config.Interception                   = new InterceptionElement();
     config.Interception.Contracts         = new InterceptContractElementCollection();
     config.Interception.Interceptors      = new InterceptorElementCollection();
 }
Ejemplo n.º 2
0
 private void LoadConfig(string configSection)
 {
     config = (OFoodsConfigSection)ConfigurationManager.GetSection(configSection);
 }