Exemple #1
0
        public App()
        {
            provider = new StreamingProviderNapster(ApiKeyProvider.GetApiKey);
            var b = new Button {
                Text = "TestCall"
            };

            b.Clicked += B_Clicked;
            // The root page of your application
            MainPage = new ContentPage
            {
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Center,
                    Children        =
                    {
                        new Label {
                            HorizontalTextAlignment = TextAlignment.Center,
                            Text = "Welcome to Xamarin Forms!"
                        },
                        b
                    }
                }
            };
        }
Exemple #2
0
        public void Add(string channel, IStreamingProvider provider)
        {
            if (string.IsNullOrWhiteSpace(channel))
            {
                throw new ArgumentNullException(nameof(channel));
            }
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            _providers.AddOrUpdate(channel, provider, (n, p) => provider);
        }