コード例 #1
0
ファイル: Broker.cs プロジェクト: jangocheng/TaskMQ
 public void RegisterConnection(string name, TaskQueue.ITQueue qI, TaskQueue.Providers.QueueSpecificParameters parameters, bool Temporary)
 {
     QueueConnectionParameters qcp = new QueueConnectionParameters(name);
     qcp.SetInstance(qI, parameters);
     qcp.Temporary = Temporary;
     AddConnection(qcp);
 }
コード例 #2
0
        public void SetInstance(TaskQueue.ITQueue instance, QueueSpecificParameters parameters)
        {
            this.QueueTypeName = instance.QueueType;
            this.QueueInstance = instance;
            #if DEBUG
            System.Diagnostics.Debug.Assert(instance.GetParametersModel().GetType() == parameters.GetType());
            #endif
            this.specParams = parameters;

            string chkresult;
            if (!parameters.Validate(out chkresult))
                throw new Exception("Invalid parameters passed to queue: " + Name);
        }
コード例 #3
0
        public void SetInstance(TaskQueue.ITQueue instance, QueueSpecificParameters parameters)
        {
            this.QueueTypeName = instance.QueueType;
            this.QueueInstance = instance;
#if DEBUG
            System.Diagnostics.Debug.Assert(instance.GetParametersModel().GetType() == parameters.GetType());
#endif
            this.specParams = parameters;

            string chkresult;
            if (!parameters.Validate(out chkresult))
            {
                throw new Exception("Invalid parameters passed to queue: " + Name);
            }
        }
コード例 #4
0
ファイル: Broker.cs プロジェクト: jangocheng/TaskMQ
 public void RegisterConnection<T>(string name, TaskQueue.Providers.QueueSpecificParameters parameters, bool Temporary)
     where T : TaskQueue.ITQueue
 {
     TaskQueue.ITQueue qm = Activator.CreateInstance<T>();
     RegisterConnection(name, qm, parameters, Temporary);
 }