Example #1
0
 public void TestToString()
 {
     DataflowTestHelpers.TestToString(nameFormat =>
                                      nameFormat != null ?
                                      new BufferBlock <int>(new DataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
                                      new BufferBlock <int>());
 }
Example #2
0
 public void TestToString()
 {
     DataflowTestHelpers.TestToString(
         nameFormat => nameFormat != null ?
         new BroadcastBlock <int>(i => i, new DataflowBlockOptions()
     {
         NameFormat = nameFormat
     }) :
         new BroadcastBlock <int>(i => i));
 }
Example #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));
 }
Example #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));
 }
Example #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));
 }
Example #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
            }));
        }