Esempio n. 1
0
        public IMembershipCondition Copy()
        {
            if (m_url == null && m_element != null)
            {
                ParseURL();
            }

            UrlMembershipCondition mc = new UrlMembershipCondition();

            mc.m_url = new URLString(m_url.ToString());
            return(mc);
        }
Esempio n. 2
0
        internal SecurityElement ToXml()
        {
            SecurityElement root = new SecurityElement(this.GetType().FullName);

            root.AddAttribute("version", "1");

            if (m_appDirectory != null)
            {
                root.AddChild(new SecurityElement("Directory", m_appDirectory.ToString()));
            }

            return(root);
        }
Esempio n. 3
0
        internal SecurityElement ToXml()
        {
            SecurityElement root = new SecurityElement( "System.Security.Policy.ApplicationDirectory" );
            // If you hit this assert then most likely you are trying to change the name of this class. 
            // This is ok as long as you change the hard coded string above and change the assert below.
            Contract.Assert( this.GetType().FullName.Equals( "System.Security.Policy.ApplicationDirectory" ), "Class name changed!" );

            root.AddAttribute( "version", "1" );
            
            if (m_appDirectory != null)
                root.AddChild( new SecurityElement( "Directory", m_appDirectory.ToString() ) );
            
            return root;
        }
Esempio n. 4
0
        internal SecurityElement ToXml()
        {
            SecurityElement root = new SecurityElement("System.Security.Policy.Url");

            // If you hit this assert then most likely you are trying to change the name of this class.
            // This is ok as long as you change the hard coded string above and change the assert below.
            BCLDebug.Assert(this.GetType().FullName.Equals("System.Security.Policy.Url"), "Class name changed!");

            root.AddAttribute("version", "1");

            if (m_url != null)
            {
                root.AddChild(new SecurityElement("Url", m_url.ToString()));
            }

            return(root);
        }
        //------------------------------------------------------
        //
        // PRIVATE AND PROTECTED HELPERS FOR ACCESSORS AND CONSTRUCTORS
        //
        //------------------------------------------------------

        //------------------------------------------------------
        //
        // CODEACCESSPERMISSION IMPLEMENTATION
        //
        //------------------------------------------------------

        //------------------------------------------------------
        //
        // IPERMISSION IMPLEMENTATION
        //
        //------------------------------------------------------


        /// <include file='doc\URLIdentityPermission.uex' path='docs/doc[@for="UrlIdentityPermission.Copy"]/*' />
        public override IPermission Copy()
        {
            return(new UrlIdentityPermission(new URLString(m_url.ToString(), true)));
        }