private void InitializeXamarinHostBuilder() { var hostBuilder = XamarinHostBuilder.CreateDefault(new EmbeddedResourceConfigurationOptions { Assembly = Assembly.GetExecutingAssembly(), Prefix = "DemoApp" }); hostBuilder.Services.AddSingleton <ISampleService, SampleService>(); Host = hostBuilder.Build(); }
public App() { var hostBuilder = XamarinHostBuilder.CreateDefault(new EmbeddedResourceConfigurationOptions { Assembly = Assembly.GetExecutingAssembly(), Prefix = "WebRTCme.DemoApp.Xamarin" }); _ = CrossWebRtcMiddlewareXamarin.Current; hostBuilder.Services.AddSingleton <INavigationService, NavigationService>(); hostBuilder.Services.AddSingleton <IRunOnUiThreadService, RunOnUiThreadService>(); hostBuilder.Services.AddXamarinMiddleware(); Host = hostBuilder.Build(); InitializeComponent(); MainPage = new AppShell(); }
public App() { var hostBuilder = XamarinHostBuilder.CreateDefault(new EmbeddedResourceConfigurationOptions { Assembly = Assembly.GetExecutingAssembly(), Prefix = "WebRTCme.DemoApp.Xamarin" }); var webRtcMiddleware = CrossWebRtcMiddlewareXamarin.Current; hostBuilder.Services.AddSingleton(serviceProvider => webRtcMiddleware.WebRtc); hostBuilder.Services.AddSingleton(serviceProvider => webRtcMiddleware); hostBuilder.Services.AddXamarinMiddleware(); Host = hostBuilder.Build(); InitializeComponent(); MainPage = new AppShell(); }