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); }
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); }
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); } }
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); }