public HTTPPOSTExecutor(DSRESTConnection connection, HttpWebRequest Client, DSRESTCommand command, DSAdmin Sender, Delegate callback, Delegate EXCallback, TJSONArray parameters) : base(connection, Client, command, Sender, callback, EXCallback) { this._parameters = parameters; Client.Method = "POST"; SetUpHeaders(Client); }
public WorkerThread(DSRESTConnection connection, DSCallbackChannelManager mngr) : base() { this.dsadmin = new DSAdmin(connection, mngr.ExCallback); this.mngr = mngr; callbacks = new Dictionary <string, DBXCallback>(); }
/** * Allows you to prepare and execute a request of type REST. * * Use the properties and methods of DSRESTCommand to: <br> * - Set and get the request type. <br> * - Set and get the specific method to call. <br> * - Prepare the command from a metadata input * parameter. <br> * - Get all the parameters contained. <br> * - Get a parameter by index or name. * */ public DSRESTCommand(DSRESTConnection Connection) : base() { this.Connection = Connection; Admin = new DSAdmin(Connection, (ex) => { throw ex; }); }
public DSCallbackChannelManager(DSRESTConnection Connection, String ChannelName) : base() { locker = new Object(); this.ChannelName = ChannelName; this.ManagerID = getNewManagerID(); this.Connection = Connection; this.dsadmin = new DSAdmin(this.Connection, ExCallback); Random random = new Random(); this.SecurityToken = Convert.ToString(random.Next(100000)) + "." + Convert.ToString(random.Next(100000)); }
/** * Clone the current connection. The session is optionally included in the clone. * * @param includeSession true to include session information in the new connection, false to exclude it. * * @return the new DSRESTConnection */ public DSRESTConnection Clone(bool includeSession) { DSRESTConnection connection = new DSRESTConnection(); connection.setHost(this.getHost()); connection.setPort(this.getPort()); connection.setProtocol(this.getProtocol()); connection.setUserName(this.getUserName()); connection.setPassword(this.getPassword()); connection.setUrlPath(this.getUrlPath()); connection.setConnectionTimeout(this.getConnectionTimeout()); if (includeSession) { connection.setSessionID(this.getSessionID()); connection.SessionIDExpires = this.SessionIDExpires; } return(connection); }
protected HTTPExecutor(DSRESTConnection connection, HttpWebRequest Client, DSRESTCommand command, DSAdmin Sender, Delegate callback, Delegate EXCallback) { this.connection = connection; this.Client = Client; this.command = command; this.Sender = Sender; this.callback = callback; this.EXCallback = EXCallback; this._TimedOut = false; this._Timer = null; //don't enable timeout if the request is for a heavyweight callback. Heavyweight callbacks should be timed out //with custom code, which uses a call to close the channel with the server when the timeout happens. if (connection.getConnectionTimeout() > 0 && !isHeavyweightCallbackRequest(Client)) { connection.syncContext.Send(new SendOrPostCallback(x => initTimer()), null); } }
public HTTPGETExecutor(DSRESTConnection connection, HttpWebRequest Client, DSRESTCommand command, DSAdmin Sender, Delegate callback, Delegate EXCallback) : base(connection, Client, command, Sender, callback, EXCallback) { Client.Method = "GET"; SetUpHeaders(Client); }
/** * Clone the current connection. The session is optionally included in the clone. * * @param includeSession true to include session information in the new connection, false to exclude it. * * @return the new DSRESTConnection */ public DSRESTConnection Clone(bool includeSession) { DSRESTConnection connection = new DSRESTConnection(); connection.setHost(this.getHost()); connection.setPort(this.getPort()); connection.setProtocol(this.getProtocol()); connection.setUserName(this.getUserName()); connection.setPassword(this.getPassword()); connection.setUrlPath(this.getUrlPath()); connection.setConnectionTimeout(this.getConnectionTimeout()); if (includeSession) { connection.setSessionID(this.getSessionID()); connection.SessionIDExpires = this.SessionIDExpires; } return connection; }
public DSAdmin(DSRESTConnection Connection, ExceptionCallback ExCal) { BaseExCal = ExCal; connection = Connection; }
public WorkerThread(DSRESTConnection connection, DSCallbackChannelManager mngr) : base() { this.dsadmin = new DSAdmin(connection, mngr.ExCallback); this.mngr = mngr; callbacks = new Dictionary<string, DBXCallback>(); }
public TCompanyTweet(DSRESTConnection Connection, ExceptionCallback ExCal) : base(Connection, ExCal) { }