Exemplo n.º 1
0
        } // Providers

        public static UiServiceProvider GetUiServiceProviderFromKey(ProviderDiscoveryRoot discoveryXml, string serviceKey)
        {
            var providers = from discovery in discoveryXml.ServiceProviderDiscovery
                            from provider in discovery.Providers
                            let uiProvider = new UiServiceProvider(provider)
                                             where uiProvider.Key == serviceKey
                                             select uiProvider;

            return(providers.FirstOrDefault());
        } // GetUiServiceProviderFromKey
Exemplo n.º 2
0
        } // GetUiServiceProviderFromKey

        private void Create(ProviderDiscoveryRoot discoveryXml)
        {
            var providers = from discovery in discoveryXml.ServiceProviderDiscovery
                            from provider in discovery.Providers
                            select provider;

            var uiProviders = from provider in providers
                              select new UiServiceProvider(provider);

            var uiProvidersList = new List <UiServiceProvider>(providers.Count());

            uiProvidersList.AddRange(uiProviders);

            Providers = uiProvidersList.AsReadOnly();
        } // Create
Exemplo n.º 3
0
 public UiProviderDiscovery(ProviderDiscoveryRoot discoveryXml)
 {
     Create(discoveryXml);
 } // constructor