internal bool TryGetPollServiceHTTPHandler(string handlerKey, out PollServiceEventArgs oServiceEventArgs) { string bestMatch = null; lock (m_pollHandlers) { if (m_pollHandlers.TryGetValue(handlerKey, out oServiceEventArgs)) { return(true); } foreach (string pattern in m_pollHandlers.Keys) { if (handlerKey.StartsWith(pattern)) { if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length) { bestMatch = pattern; } } } if (String.IsNullOrEmpty(bestMatch)) { oServiceEventArgs = null; return(false); } oServiceEventArgs = m_pollHandlers[bestMatch]; return(true); } }
public PollServiceHttpRequest( PollServiceEventArgs pPollServiceArgs, HttpListenerContext context) { PollServiceArgs = pPollServiceArgs; Context = context; RequestTime = System.Environment.TickCount; RequestID = UUID.Random(); }
public PollServiceHttpRequest(PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest) { PollServiceArgs = pPollServiceArgs; HttpContext = pHttpContext; Request = pRequest; RequestTime = Environment.TickCount; RequestID = UUID.Random(); }
public PollServiceHttpRequest(PollServiceEventArgs pPollServiceArgs, IPipelineHandlerContext pHttpContext, IRequest pRequest) { PollServiceArgs = pPollServiceArgs; HttpContext = pHttpContext; Request = pRequest; RequestTime = Environment.TickCount; RequestID = UUID.Random(); }
public PollServiceHttpRequest( PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest) { PollServiceArgs = pPollServiceArgs; HttpContext = pHttpContext; Request = pRequest; RequestTime = System.Environment.TickCount; RequestID = UUID.Random(); }
public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args) { lock (m_pollHandlers) { if (!m_pollHandlers.ContainsKey(methodName)) { m_pollHandlers.Add(methodName, args); return(true); } } return(false); }
internal bool TryGetPollServiceHTTPHandler(string handlerKey, out PollServiceEventArgs oServiceEventArgs) { string bestMatch = null; lock (m_pollHandlers) { if (m_pollHandlers.TryGetValue(handlerKey, out oServiceEventArgs)) return true; foreach (string pattern in m_pollHandlers.Keys) { if (handlerKey.StartsWith(pattern)) { if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length) { bestMatch = pattern; } } } if (String.IsNullOrEmpty(bestMatch)) { oServiceEventArgs = null; return false; } oServiceEventArgs = m_pollHandlers[bestMatch]; return true; } }
public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args) { lock (m_pollHandlers) { if (!m_pollHandlers.ContainsKey(methodName)) { m_pollHandlers.Add(methodName, args); return true; } } return false; }
public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args) { bool pollHandlerResult = false; lock (m_pollHandlers) { if (!m_pollHandlers.ContainsKey(methodName)) { m_pollHandlers.Add(methodName, args); pollHandlerResult = true; } } if (pollHandlerResult) return AddHTTPHandler(methodName, handler); return false; }