Example #1
0
 public static OicHostBuilder UseCoapUdp(this OicHostBuilder builder)
 {
     return(builder.ConfigureServices(services =>
                                      services
                                      .AddSingleton <ICoapTransportFactory, CoapUdpTransportFactory>()
                                      ));
 }
Example #2
0
 public static OicHostBuilder UseCoap(this OicHostBuilder builder)
 {
     return(builder.ConfigureServices(services =>
                                      services
                                      .AddTransient <IConfigureOptions <OicCoapServerOptions>, OicCoapServerOptionsSetup>()
                                      .AddTransient <IOicContextFactory, OicCoapContextFactory>()
                                      .AddSingleton <IOicServer, OicCoapServer>()
                                      ));
 }