System.Security.Permissions.ResourcePermissionBase.ToXml C# (CSharp) Method

ToXml() public method

public ToXml ( ) : SecurityElement
return SecurityElement
        public override SecurityElement ToXml() {
            SecurityElement root = new SecurityElement("IPermission");
            Type type = this.GetType();
            root.AddAttribute("class", type.FullName + ", " + type.Module.Assembly.FullName.Replace('\"', '\''));
            root.AddAttribute("version", "1");

            if (this.isUnrestricted) {
                root.AddAttribute("Unrestricted", "true");
                return root;
            }

            WriteChildren(root, this.rootTable, 0);
            return root;
        }