Пример #1
0
        private static ITargetBlock <bool> CreateOutputAvailableTarget()
        {
            var slt = new StoreLinkedTarget <bool>();

            slt.OutputAvailableAsync();
            return(slt.GetLinkedTarget());
        }
Пример #2
0
        private static ITargetBlock <T> CreateChooseTarget <T>()
        {
            var slt = new StoreLinkedTarget <T>();

            DataflowBlock.Choose(slt, i => { }, new BufferBlock <T>(), i => { });
            return(slt.GetLinkedTarget());
        }
Пример #3
0
        private static ITargetBlock <T> CreateReceiveTarget <T>()
        {
            var slt = new StoreLinkedTarget <T>();

            slt.ReceiveAsync();
            return(slt.GetLinkedTarget());
        }