Microsoft.Ccr.Core.MultipleItemGather.Consume C# (CSharp) Method

Consume() public method

public Consume ( IPortElement item ) : void
item IPortElement
return void
        public override void Consume(IPortElement item)
        {
            throw new InvalidOperationException ();
        }

Usage Example

コード例 #1
0
ファイル: MultipleItemGatherTest.cs プロジェクト: kumpera/Ccr
        public void Consume()
        {
            Type[] types = new Type[] { typeof (int), typeof (string) };
            IPortReceive[] ports = new IPortReceive[] { new Port<int>(), new Port<string> () };
            int count = 1;
            Handler<ICollection[]> handler = (cols) => {};
            var mig = new MultipleItemGather (types, ports, count, handler);

            try {
                mig.Consume (new PortElement<int> (10));
                Assert.Fail ("#1");
            } catch (InvalidOperationException) {}
        }