System.Security.Permissions.HostProtectionPermission.FromXml C# (CSharp) Method

FromXml() public method

public FromXml ( SecurityElement esd ) : void
esd System.Security.SecurityElement
return void
        public override void FromXml(SecurityElement esd)
        {
            CodeAccessPermission.ValidateElement( esd, this );
            if (XMLUtil.IsUnrestricted( esd ))
                Resources = HostProtectionResource.All;
            else
            {
                String resources = esd.Attribute( "Resources" );
                if (resources == null)
                    Resources = HostProtectionResource.None;
                else
                    Resources = (HostProtectionResource)Enum.Parse( typeof( HostProtectionResource ), resources );
            }
        }