コード例 #1
0
        public static void LoadProviders()
        {
            if (_provider == null)
            {
                lock (_lock)
                {
                    if (_provider == null)
                    {
                        // Get a reference to the <imageService> section
                        CTIServiceSection section = (CTIServiceSection)
                                                    WebConfigurationManager.GetSection
                                                        ("ctiService");

                        // Load registered providers and point _provider
                        // to the default provider
                        _providers = new CTIProviderCollection();
                        ProvidersHelper.InstantiateProviders
                            (section.Providers, _providers,
                            typeof(CTIProvider));
                        _provider = _providers[section.DefaultProvider];

                        if (_provider == null)
                        {
                            throw new ProviderException
                                      ("Unable to load default CTIProvider");
                        }
                    }
                }
            }
        }
コード例 #2
0
ファイル: CTIService.cs プロジェクト: gnomix/T.A.L.K.
        public static void LoadProviders()
        {
            if (_provider == null)
            {
                lock (_lock)
                {
                    if (_provider == null)
                    {
                        // Get a reference to the <imageService> section
                        CTIServiceSection section = (CTIServiceSection)
                            WebConfigurationManager.GetSection
                            ("ctiService");

                        // Load registered providers and point _provider
                        // to the default provider
                        _providers = new CTIProviderCollection();
                        ProvidersHelper.InstantiateProviders
                            (section.Providers, _providers,
                            typeof(CTIProvider));
                        _provider = _providers[section.DefaultProvider];

                        if (_provider == null)
                            throw new ProviderException
                                ("Unable to load default CTIProvider");

                    }
                }
            }
        }