コード例 #1
0
ファイル: SpeedDialService.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
                        SpeedDialServiceSection section = (SpeedDialServiceSection)
                            WebConfigurationManager.GetSection
                            ("speeddialService");

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

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

                    }
                }
            }
        }
コード例 #2
0
ファイル: SpeedDialService.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
                        SpeedDialServiceSection section = (SpeedDialServiceSection)
                                                          WebConfigurationManager.GetSection
                                                              ("speeddialService");

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

                        if (_provider == null)
                        {
                            throw new ProviderException
                                      ("Unable to load default SpeedDialProvider");
                        }
                    }
                }
            }
        }