// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // ISourceBlock.cs // // // The base interface for all source blocks. // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace System.Threading.Tasks.Dataflow { /// Represents a dataflow block that is a source of data. /// Specifies the type of data supplied by the . public interface ISourceBlock : IDataflowBlock { // IMPLEMENT IMPLICITLY /// IDisposable LinkTo(ITargetBlock target, DataflowLinkOptions linkOptions); // IMPLEMENT EXPLICITLY /// [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")] TOutput ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock target, out Boolean messageConsumed); /// Boolean ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock target); /// void ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock target); } }