/// <summary> /// Shurtcut for running this <see cref="Source{TOut,TMat}"/> with a <see cref="QueueSink"/>. /// The returned <see cref="Task"/> will be completed with Success when reaching the /// normal end of the stream, or completed with Failure if there is a failure signaled in the stream. /// </summary> public static Task ToStorageQueue <TMat>(this Source <string, TMat> source, QueueClient queue, IMaterializer materializer, AddRequestOptions options = null) { return(source.RunWith(new QueueSink(queue, options), materializer)); }
/// <summary> /// Create a new instance of the <see cref="QueueSink"/> /// </summary> /// <param name="queue">The queue</param> /// <param name="options">The options for the <see cref="CloudQueue.AddMessageAsync(CloudQueueMessage)"/> call</param> public QueueSink(CloudQueue queue, AddRequestOptions options = null) { _queue = queue; _options = options ?? new AddRequestOptions(); Shape = new SinkShape <CloudQueueMessage>(In); }
/// <summary> /// Shurtcut for running this <see cref="Source{TOut,TMat}"/> with a <see cref="QueueSink"/>. /// The returned <see cref="Task"/> will be completed with Success when reaching the /// normal end of the stream, or completed with Failure if there is a failure signaled in the stream. /// </summary> public static Task ToStorageQueue <TMat>(this Source <CloudQueueMessage, TMat> source, CloudQueue queue, IMaterializer materializer, AddRequestOptions options = null) { return(source.RunWith(new QueueSink(queue, options), materializer)); }
/// <summary> /// Creates a <see cref="Sink{TIn,TMat}"/> for the Azure Storage Queue /// </summary> /// <param name="queue">The queue</param> /// <param name="options">The options for the <see cref="CloudQueue.AddMessageAsync(CloudQueueMessage)"/> call</param> /// <returns>The <see cref="Sink{TIn,TMat}"/> for the Azure Storage Queue</returns> public static Sink <CloudQueueMessage, Task> Create(CloudQueue queue, AddRequestOptions options = null) { return(Sink.FromGraph(new QueueSink(queue, options))); }