Exemplo n.º 1
0
 public void TestToString()
 {
     DataflowTestHelpers.TestToString(nameFormat =>
                                      nameFormat != null ?
                                      new BufferBlock <int>(new DataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
                                      new BufferBlock <int>());
 }
Exemplo n.º 2
0
 public void TestToString()
 {
     DataflowTestHelpers.TestToString(
         nameFormat => nameFormat != null ?
         new BroadcastBlock <int>(i => i, new DataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
         new BroadcastBlock <int>(i => i));
 }
Exemplo n.º 3
0
 public void TestToString()
 {
     DataflowTestHelpers.TestToString(nameFormat =>
                                      nameFormat != null ?
                                      new TransformBlock <int, int>(i => i, new ExecutionDataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
                                      new TransformBlock <int, int>(i => i));
 }
Exemplo n.º 4
0
 public void TestToString()
 {
     DataflowTestHelpers.TestToString(nameFormat =>
                                      nameFormat != null ?
                                      new BatchBlock <int>(2, new GroupingDataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
                                      new BatchBlock <int>(2));
 }
 public void TestToStringAsyncEnumerable()
 {
     DataflowTestHelpers.TestToString(nameFormat =>
                                      nameFormat != null ?
                                      new TransformManyBlock <int, int>(DataflowTestHelpers.ToAsyncEnumerable, new ExecutionDataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
                                      new TransformManyBlock <int, int>(DataflowTestHelpers.ToAsyncEnumerable));
 }
Exemplo n.º 6
0
 public void TestToString()
 {
     // Test ToString() with the only custom configuration being NameFormat
     DataflowTestHelpers.TestToString(
         nameFormat => nameFormat != null ?
         new WriteOnceBlock <int>(i => i, new DataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
         new WriteOnceBlock <int>(i => i));
 }
Exemplo n.º 7
0
 public void TestToString()
 {
     DataflowTestHelpers.TestToString(
         nameFormat => nameFormat != null ?
         new JoinBlock <int, string>(new GroupingDataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
         new JoinBlock <int, string>());
     DataflowTestHelpers.TestToString(
         nameFormat => nameFormat != null ?
         new JoinBlock <int, string, double>(new GroupingDataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
         new JoinBlock <int, string, double>());
 }
        public void TestToString()
        {
            // Test ToString() with the only custom configuration being NameFormat
            DataflowTestHelpers.TestToString(
                nameFormat => nameFormat != null ?
                new ActionBlock <int>(i => { }, new ExecutionDataflowBlockOptions()
            {
                NameFormat = nameFormat
            }) :
                new ActionBlock <int>(i => { }));

            // Test ToString() with other configuration
            DataflowTestHelpers.TestToString(
                nameFormat => nameFormat != null ?
                new ActionBlock <int>(i => { }, new ExecutionDataflowBlockOptions()
            {
                NameFormat = nameFormat, SingleProducerConstrained = true
            }) :
                new ActionBlock <int>(i => { }, new ExecutionDataflowBlockOptions()
            {
                SingleProducerConstrained = true
            }));
        }