Exemple #1
0
        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));
        }
Exemple #2
0
 /// <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));;
 }
Exemple #3
0
 /// <summary>
 /// Constructs a new queue helper
 /// </summary>
 /// <param name="queue">The queue to use module</param>
 public QueueHelper(string queue)
     : this(QueueModule.GetQueue(queue))
 {
 }
Exemple #4
0
 /// <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));
 }
Exemple #5
0
 /// <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)
 {
 }