Exemple #1
0
        private static void Initialize()
        {
            //try
            //{
                EditorConfiguration editorConfig = EditorConfiguration.GetConfig();

                if (
                    (editorConfig.DefaultProvider == null)
                    || (editorConfig.Providers == null)
                    || (editorConfig.Providers.Count < 1)
                    )
                {
                    throw new ProviderException("You must specify a valid default provider.");
                }

                providerCollection = new EditorProviderCollection();

                ProvidersHelper.InstantiateProviders(
                    editorConfig.Providers,
                    providerCollection,
                    typeof(EditorProvider));

                providerCollection.SetReadOnly();
                defaultProvider = providerCollection[editorConfig.DefaultProvider];

            //}
            //catch (Exception ex)
            //{
            //    initializationException = ex;
            //    isInitialized = true;
            //    throw ex;
            //}

            //isInitialized = true;
        }
Exemple #2
0
        private static void Initialize()
        {
            //try
            //{
            EditorConfiguration editorConfig = EditorConfiguration.GetConfig();

            if (
                (editorConfig.DefaultProvider == null) ||
                (editorConfig.Providers == null) ||
                (editorConfig.Providers.Count < 1)
                )
            {
                throw new ProviderException("You must specify a valid default provider.");
            }


            providerCollection = new EditorProviderCollection();

            ProvidersHelper.InstantiateProviders(
                editorConfig.Providers,
                providerCollection,
                typeof(EditorProvider));

            providerCollection.SetReadOnly();
            defaultProvider = providerCollection[editorConfig.DefaultProvider];

            //}
            //catch (Exception ex)
            //{
            //    initializationException = ex;
            //    isInitialized = true;
            //    throw ex;
            //}

            //isInitialized = true;
        }