예제 #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);
 }