Lines Matching refs:new
44 server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
46 Services = { Math.BindService(new MathServiceImpl()) },
50 channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure);
51 client = new Math.MathClient(channel);
64 DivReply response = client.Div(new DivArgs { Dividend = 10, Divisor = 3 });
72 DivReply response = client.Div(new DivArgs { Dividend = 0, Divisor = 1 });
80 var ex = Assert.Throws<RpcException>(() => client.Div(new DivArgs { Dividend = 0, Divisor = 0 }));
87 DivReply response = await client.DivAsync(new DivArgs { Dividend = 10, Divisor = 3 });
95 using (var call = client.Fib(new FibArgs { Limit = 6 }))
98 CollectionAssert.AreEqual(new List<long> { 1, 1, 2, 3, 5, 8 },
106 var cts = new CancellationTokenSource();
108 using (var call = client.Fib(new FibArgs { Limit = 0 }, cancellationToken: cts.Token))
110 List<long> responses = new List<long>();
135 using (var call = client.Fib(new FibArgs { Limit = 0 },
141 Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });
151 var numbers = new List<long> { 10, 20, 30 }.Select(n => new Num { Num_ = n });
162 var divArgsList = new List<DivArgs>
164 new DivArgs { Dividend = 10, Divisor = 3 },
165 new DivArgs { Dividend = 100, Divisor = 21 },
166 new DivArgs { Dividend = 7, Divisor = 2 }
174 CollectionAssert.AreEqual(new long[] { 3, 4, 3 }, result.Select((divReply) => divReply.Quotient));
175 CollectionAssert.AreEqual(new long[] { 1, 16, 1 }, result.Select((divReply) => divReply.Remainder));