Exemplo n.º 1
0
        /// <summary>
        /// Constructor estatico . Inicializa la sección FwkServiceMetadata
        /// </summary>
        static ServiceMetadata()
        {
            TechnicalException te;
            try
            {
                _ProviderSection = ConfigurationManager.GetSection("FwkServiceMetadata") as ServiceProviderSection;

                if (_ProviderSection == null)
                {
                    te = new TechnicalException("No se puede cargar el proveedor de configuracion de Metadata de servicios del framework fwk, verifique si existe la seccion [FwkServiceMetadata] en el archivo de configuracion.");
                    te.ErrorId = "7000";
                    te.Namespace = "Fwk.ServiceManagement";
                    te.Class = "Fwk.Configuration.ServiceManagement [static constructor --> ServiceMetadata()]";
                    te.UserName = Environment.UserName;
                    te.Machine = Environment.MachineName;
                    te.Source = ConfigurationsHelper.HostApplicationName;

                    throw te;
                }
            }
            catch (System.Exception ex)
            {
                te = new TechnicalException("No se puede cargar el proveedor de configuracion de Metadata de servicios del framework fwk, verifique si existe la seccion [FwkServiceMetadata] en el archivo de configuracion.",ex);
                te.ErrorId = "7000";
                te.Namespace = "Fwk.ServiceManagement";
                te.Class = "Fwk.Configuration.ServiceManagement [static constructor --> ServiceMetadata()]";
                te.UserName = Environment.UserName;
                te.Machine = Environment.MachineName;
                te.Source = ConfigurationsHelper.HostApplicationName;

                throw te;

            }


            if (_Repository == null)
            {
                _Repository = new Dictionary<string, ServiceConfigurationCollection>();
            }
        }
Exemplo n.º 2
0
        public void Init_FwkServiceMetadata_Section()
        {

            if (_ServiceProviderSection == null)
            {
                _ServiceProviderSection = ConfigurationManager.GetSection("FwkServiceMetadata") as ServiceProviderSection;
            }

        }