MCPcopy Create free account
hub / github.com/apache/thrift / RunAsync

Method RunAsync

tutorial/netstd/Server/Program.cs:122–139  ·  view source on GitHub ↗
(string[] args, CancellationToken cancellationToken)

Source from the content-addressed store, hash-verified

120 }
121
122 private static async Task RunAsync(string[] args, CancellationToken cancellationToken)
123 {
124 var selectedTransport = GetTransport(args);
125 var selectedBuffering = GetBuffering(args);
126 var selectedProtocol = GetProtocol(args);
127 var multiplex = GetMultiplex(args);
128
129 if (selectedTransport == Transport.Http)
130 {
131 if (multiplex)
132 throw new Exception("This tutorial sample code does not yet allow multiplex over http (although Thrift itself of course does)");
133 new HttpServerSample().Run(cancellationToken);
134 }
135 else
136 {
137 await RunSelectedConfigurationAsync(selectedTransport, selectedBuffering, selectedProtocol, multiplex, cancellationToken);
138 }
139 }
140
141
142 private static bool GetMultiplex(string[] args)

Callers 1

RunMethod · 0.45

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected