/// <summary> /// Initializes a new instance of <c>ExceptionHandlerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="exceptionType">The type of the exception to be handled.</param> /// <param name="exceptionHandlerType">The type of the exception handler.</param> /// <param name="behavior">The exception handling behavior.</param> public ExceptionHandlerConfigurator(IConfigSourceConfigurator context, Type exceptionType, Type exceptionHandlerType, ExceptionHandlingBehavior behavior) : base(context) { this.exceptionType = exceptionType; this.exceptionHandlerType = exceptionHandlerType; this.behavior = behavior; }
/// <summary> /// Initializes a new instance of <c>InterceptionConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="interceptorType">The type of the interceptor to be registered.</param> /// <param name="contractType">The type that needs to be intercepted.</param> /// <param name="interceptMethod">The <see cref="MethodInfo"/> instance that needs to be intercepted.</param> public InterceptionConfigurator(IConfigSourceConfigurator context, Type interceptorType, Type contractType, MethodInfo interceptMethod) : base(context) { this.interceptorType = interceptorType; this.contractType = contractType; this.interceptMethod = interceptMethod; }
/// <summary> /// Initializes a new instance of <c>InterceptionConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="interceptorType">The type of the interceptor to be registered.</param> /// <param name="contractType">The type that needs to be intercepted.</param> /// <param name="interceptMethod">The <see cref="MethodInfo"/> instance that needs to be intercepted.</param> public InterceptionConfigurator(IConfigSourceConfigurator context, Type interceptorType, Type contractType, MethodInfo interceptMethod) : base(context) { this.interceptorType = interceptorType; this.contractType = contractType; this.interceptMethod = interceptMethod; }
/// <summary> /// Initializes a new instance of <c>ExceptionHandlerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="exceptionType">The type of the exception to be handled.</param> /// <param name="exceptionHandlerType">The type of the exception handler.</param> /// <param name="behavior">The exception handling behavior.</param> public ExceptionHandlerConfigurator(IConfigSourceConfigurator context, Type exceptionType, Type exceptionHandlerType, ExceptionHandlingBehavior behavior) : base(context) { this.exceptionType = exceptionType; this.exceptionHandlerType = exceptionHandlerType; this.behavior = behavior; }
/// <summary> /// 初始化<c> HandlerConfigurator </ c>类的新实例. /// </summary> /// <param name="context">配置上下文.</param> /// <param name="name">消息处理程序的名称.</param> /// <param name="handlerKind">指定处理程序类型的<see cref ="HandlerKind"/>可以是Command或Event.</param> /// <param name="sourceType">指定源的类型的<see cref ="HandlerSourceType"/>可以是程序集或类型.</param> /// <param name="source">The source name, if <paramref name="sourceType"/> is Assembly, the source name should be the assembly full name, if /// <paramref name="sourceType"/> is Type, the source name should be the assembly qualified name of the type.</param> public HandlerConfigurator(IConfigSourceConfigurator context, string name, HandlerKind handlerKind, HandlerSourceType sourceType, string source) : base(context) { this.name = name; this.handlerKind = handlerKind; this.sourceType = sourceType; this.source = source; }
/// <summary> /// Initializes a new instance of <c>HandlerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="name">The name of the message handler.</param> /// <param name="handlerKind">The <see cref="HandlerKind"/> which specifies the kind of the handler, can either be a Command or an Event.</param> /// <param name="sourceType">The <see cref="HandlerSourceType"/> which specifies the type of the source, can either be an Assembly or a Type.</param> /// <param name="source">The source name, if <paramref name="sourceType"/> is Assembly, the source name should be the assembly full name, if /// <paramref name="sourceType"/> is Type, the source name should be the assembly qualified name of the type.</param> public HandlerConfigurator(IConfigSourceConfigurator context, string name, HandlerKind handlerKind, HandlerSourceType sourceType, string source) : base(context) { this.name = name; this.handlerKind = handlerKind; this.sourceType = sourceType; this.source = source; }
/// <summary> /// Initializes a new instance of <c>InterceptionConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="interceptorType">The type of the interceptor to be registered.</param> /// <param name="contractType">The type that needs to be intercepted.</param> /// <param name="interceptMethod">The name of the method that needs to be intercepted.</param> public InterceptionConfigurator(IConfigSourceConfigurator context, Type interceptorType, Type contractType, string interceptMethod) : base(context) { this.interceptorType = interceptorType; this.contractType = contractType; var method = contractType.GetMethod(interceptMethod, BindingFlags.Public | BindingFlags.Instance); if (method != null) this.interceptMethod = method; else throw new ConfigException("The method {0} requested doesn't exist in type {1}.", interceptMethod, contractType); }
/// <summary> /// Initializes a new instance of <c>InterceptionConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="interceptorType">The type of the interceptor to be registered.</param> /// <param name="contractType">The type that needs to be intercepted.</param> /// <param name="interceptMethod">The name of the method that needs to be intercepted.</param> public InterceptionConfigurator(IConfigSourceConfigurator context, Type interceptorType, Type contractType, string interceptMethod) : base(context) { this.interceptorType = interceptorType; this.contractType = contractType; var method = contractType.GetMethod(interceptMethod, BindingFlags.Public | BindingFlags.Instance); if (method != null) { this.interceptMethod = method; } else { throw new ConfigException("The method {0} requested doesn't exist in type {1}.", interceptMethod, contractType); } }
/// <summary> /// 初始化<c> IdentityGeneratorConfigurator </ c>类的新实例. /// </summary> /// <param name="context">配置上下文.</param> /// <param name="identityGeneratorType">要在应用程序中使用的生成器类型.</param> public IdentityGeneratorConfigurator(IConfigSourceConfigurator context, Type identityGeneratorType) : base(context, identityGeneratorType) { }
/// <summary> /// Initializes a new instance of <c>ExceptionHandlerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="exceptionType">The type of the exception to be handled.</param> /// <param name="exceptionHandlerType">The type of the exception handler.</param> public ExceptionHandlerConfigurator(IConfigSourceConfigurator context, Type exceptionType, Type exceptionHandlerType) : this(context, exceptionType, exceptionHandlerType, ExceptionHandlingBehavior.Direct) { }
/// <summary> /// Initializes a new instance of <c>ObjectContainerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="objectContainerType">The type of the object container to be used by the application.</param> /// <param name="initFromConfigFile">The <see cref="Boolean"/> value which indicates whether the container configuration should be read from the config file.</param> /// <param name="sectionName">The name of the section in the config file. This value must be specified when the <paramref name="initFromConfigFile"/> parameter is set to true.</param> public ObjectContainerConfigurator(IConfigSourceConfigurator context, Type objectContainerType, bool initFromConfigFile, string sectionName) : base(context, objectContainerType) { this.initFromConfigFile = initFromConfigFile; this.sectionName = sectionName; }
/// <summary> /// Initializes a new instance of <c>SequenceGeneratorConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="sequenceGeneratorType">The type of the generator to be used in the application.</param> public SequenceGeneratorConfigurator(IConfigSourceConfigurator context, Type sequenceGeneratorType) : base(context, sequenceGeneratorType) { }
/// <summary> /// Initializes a new instance of <c>HandlerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="handlerKind">The <see cref="HandlerKind"/> which specifies the kind of the handler, can either be a Command or an Event.</param> /// <param name="sourceType">The <see cref="HandlerSourceType"/> which specifies the type of the source, can either be an Assembly or a Type.</param> /// <param name="source">The source name, if <paramref name="sourceType"/> is Assembly, the source name should be the assembly full name, if /// <paramref name="sourceType"/> is Type, the source name should be the assembly qualified name of the type.</param> public HandlerConfigurator(IConfigSourceConfigurator context, HandlerKind handlerKind, HandlerSourceType sourceType, string source) : this(context, Guid.NewGuid().ToString(), handlerKind, sourceType, source) { }
public ApplicationConfigurator(IConfigSourceConfigurator context, Type appType) : base(context, appType) { }
/// <summary> /// Initializes a new instance of <c>TypeSpecifiedConfigSourceConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="type">The type that is needed by the configuration.</param> public TypeSpecifiedConfigSourceConfigurator(IConfigSourceConfigurator context, Type type) : base(context) { this.type = type; }
/// <summary> /// 初始化<c> HandlerConfigurator </ c>类的新实例. /// </summary> /// <param name="context">配置上下文.</param> /// <param name="handlerKind">The <see cref="HandlerKind"/> which specifies the kind of the handler, can either be a Command or an Event.</param> /// <param name="sourceType">The <see cref="HandlerSourceType"/> which specifies the type of the source, can either be an Assembly or a Type.</param> /// <param name="source">The source name, if <paramref name="sourceType"/> is Assembly, the source name should be the assembly full name, if /// <paramref name="sourceType"/> is Type, the source name should be the assembly qualified name of the type.</param> public HandlerConfigurator(IConfigSourceConfigurator context, HandlerKind handlerKind, HandlerSourceType sourceType, string source) : this(context, Guid.NewGuid().ToString(), handlerKind, sourceType, source) { }
/// <summary> /// Initializes a new instance of the <c>ConfigSourceConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> public ConfigSourceConfigurator(IConfigSourceConfigurator context) : base(context) { }
/// <summary> /// Initializes a new instance of <c>ExceptionHandlerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="exceptionType">The type of the exception to be handled.</param> /// <param name="exceptionHandlerType">The type of the exception handler.</param> public ExceptionHandlerConfigurator(IConfigSourceConfigurator context, Type exceptionType, Type exceptionHandlerType) : this(context, exceptionType, exceptionHandlerType, ExceptionHandlingBehavior.Direct) { }
public ObjectContainerConfigurator(IConfigSourceConfigurator context, Type objectContainerType) : base(context, objectContainerType) { }
/// <summary> /// Initializes a new instance of <c>TypeSpecifiedConfigSourceConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="type">The type that is needed by the configuration.</param> public TypeSpecifiedConfigSourceConfigurator(IConfigSourceConfigurator context, Type type) : base(context) { this.type = type; }
/// <summary> /// Initializes a new instance of <c>ObjectContainerConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="objectContainerType">The type of the object container to be used by the application.</param> /// <param name="initFromConfigFile">The <see cref="Boolean"/> value which indicates whether the container configuration should be read from the config file.</param> /// <param name="sectionName">The name of the section in the config file. This value must be specified when the <paramref name="initFromConfigFile"/> parameter is set to true.</param> public ObjectContainerConfigurator(IConfigSourceConfigurator context, Type objectContainerType, bool initFromConfigFile, string sectionName) : base(context, objectContainerType) { this.initFromConfigFile = initFromConfigFile; this.sectionName = sectionName; }
/// <summary> /// Initializes a new instance of <c>ApplicationConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="appType">The type of the application.</param> public ApplicationConfigurator(IConfigSourceConfigurator context, Type appType) : base(context, appType) { }
public SequenceGeneratorConfigurator(IConfigSourceConfigurator context, Type sequenceGeneratorType) : base(context, sequenceGeneratorType) { }
/// <summary> /// Initializes a new instance of <c>IdentityGeneratorConfigurator</c> class. /// </summary> /// <param name="context">The configuration context.</param> /// <param name="identityGeneratorType">The type of the generator to be used in the application.</param> public IdentityGeneratorConfigurator(IConfigSourceConfigurator context, Type identityGeneratorType) : base(context, identityGeneratorType) { }