public Task <bool> HandleAsync(IHttpContext context) { var queue = QueueModule.GetQueue(m_queuename); if (queue == null || !queue.IsSecureRequest(context.Request)) { context.Response.StatusCode = HttpStatusCode.Forbidden; return(Task.FromResult(true)); } return(Task.FromResult(false)); }
/// <summary> /// Constructs a new queue helper /// </summary> /// <param name="parent">The parent module</param> public QueueHelper(QueueModule parent) { m_parent = parent ?? throw new ArgumentNullException(nameof(parent));; }
/// <summary> /// Constructs a new queue helper /// </summary> /// <param name="queue">The queue to use module</param> public QueueHelper(string queue) : this(QueueModule.GetQueue(queue)) { }
/// <summary> /// Constructs a new queue helper /// </summary> /// <param name="parent">The parent module</param> /// <param name="url">The url</param> public QueueHelperFixedUrl(QueueModule parent, string url) { m_parent = parent ?? throw new ArgumentNullException(nameof(parent)); m_url = url ?? throw new ArgumentNullException(nameof(parent)); }
/// <summary> /// Constructs a new queue helper /// </summary> /// <param name="queue">The queue to use module</param> /// <param name="url">The url</param> public QueueHelperFixedUrl(string queue, string url) : this(QueueModule.GetQueue(queue), url) { }