コード例 #1
0
ファイル: DistributionCommand.cs プロジェクト: udbeeq5566/ESB
 public DistributionCommand(IAsyncService asyncService, IOrganizationConfiguration config)
     : base(asyncService, config)
 {
     _distributionTaskService = new EsbDistributionTaskService();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncOperationCommand"/> class.
 /// </summary>
 /// <param name="asyncService">The asynchronous service.</param>
 /// <param name="config">The configuration.</param>
 protected AsyncOperationCommand(IAsyncService asyncService, IOrganizationConfiguration config)
 {
     this.AsyncService = asyncService;
     this.Configuration = config;
 }
コード例 #3
0
ファイル: AsyncService.cs プロジェクト: udbeeq5566/ESB
        /// <summary>
        /// Creates the command.
        /// </summary>
        /// <param name="operationType">Type of the operation.</param>
        /// <param name="config">The configuration.</param>
        /// <returns></returns>
        internal AsyncOperationCommand CreateCommand(Guid operationType, IOrganizationConfiguration config)
        {
            TypeData typeData = new TypeData(System.Type.GetType(ConfigurationManager.AppSettings[operationType.ToString().ToUpper()]), operationType);

            if (typeData != null)
            {
                MyTrace.Write(TraceCategory.AsyncService, Mysoft.MAP2.Common.Trace.TraceLevel.Info,
                              "为作业类型{0}创建AsyncOperationCommand {1}。",
                              operationType,
                              typeData.Value);
                return System.Activator.CreateInstance(typeData.Value, this, config) as AsyncOperationCommand;
            }

            MyTrace.Write(TraceCategory.AsyncService, Mysoft.MAP2.Common.Trace.TraceLevel.Warning,
                          "未找到作业类型{0}对应AsyncOperationCommand类型。",
                          operationType);
            return new UnrecognizedOperationTypeCommand(this, config);
        }
コード例 #4
0
 public MyCommand(IAsyncService asyncService, IOrganizationConfiguration config)
     : base(asyncService, config)
 {
 }
コード例 #5
0
 /// <summary>
 /// Creates the instance.
 /// </summary>
 /// <param name="queueManager">The queue manager.</param>
 /// <param name="organizationConfiguration">The organization configuration.</param>
 /// <returns></returns>
 IQueueDataAccess IQueueDataAccessFactory.CreateInstance(QueueManager queueManager, IOrganizationConfiguration organizationConfiguration)
 {
     return new QueueDataAccess(queueManager, organizationConfiguration);
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnrecognizedOperationTypeCommand"/> class.
 /// </summary>
 /// <param name="asyncService">The asynchronous service.</param>
 /// <param name="config">The configuration.</param>
 public UnrecognizedOperationTypeCommand(IAsyncService asyncService, IOrganizationConfiguration config)
     : base(asyncService, config)
 {
 }
コード例 #7
0
 /// <summary>
 /// Creates the queue management operation.
 /// </summary>
 /// <param name="queueName">Name of the queue.</param>
 /// <param name="eventName">Name of the event.</param>
 /// <param name="eventAction">The event action.</param>
 /// <returns></returns>
 public IServiceOperation CreateQueueManagementOperation(string queueName, string eventName, IOrganizationConfiguration organizationConfiguration,
                                                         ServiceOperationAction eventAction)
 {
     var managementOperation = new QueueManagementOperation(queueName, eventName, organizationConfiguration,
                                                                                 eventAction, this.EventLog);
     this.ApplyBehaviors(managementOperation);
     return managementOperation;
 }
コード例 #8
0
 /// <summary>
 /// Creates the organization operation.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="organizationConfiguration">The organization configuration.</param>
 /// <param name="eventAction">The event action.</param>
 /// <returns></returns>
 public IServiceOperation CreateOrganizationOperation(string name, IOrganizationConfiguration organizationConfiguration,
                                                      ServiceOperationAction eventAction)
 {
     var organizationOperation = new OrganizationOperation(name, organizationConfiguration, eventAction, this.EventLog);
     this.ApplyBehaviors( organizationOperation);
     return organizationOperation;
 }