System.Net.Configuration.WebProxyScriptElement.PostDeserialize C# (CSharp) Method

PostDeserialize() protected method

protected PostDeserialize ( ) : void
return void
        protected override void PostDeserialize()
        {
            // Perf optimization. If the configuration is coming from machine.config
            // It is safe and we don't need to check for permissions.
            if (EvaluationContext.IsMachineLevel)
                return;

            try {
                ExceptionHelper.WebPermissionUnrestricted.Demand();
            } catch (Exception exception) {

                throw new ConfigurationErrorsException(
                              SR.GetString(SR.net_config_element_permission,
                                           ConfigurationStrings.WebProxyScript),
                              exception);
            }
        }