public StrongName(System.Security.Permissions.StrongNamePublicKeyBlob !blob, string !name, Version !version)
 {
     CodeContract.Requires(name != null);
     CodeContract.Requires(blob != null);
     CodeContract.Requires(version != null);
     return(default(StrongName));
 }
Exemplo n.º 2
0
        private void ParseKeyBlob()
        {
            lock (this)
            {
                if (m_element == null)
                {
                    return;
                }

                String elBlob = m_element.Attribute(s_tagPublicKeyBlob);
                StrongNamePublicKeyBlob publicKeyBlob = new StrongNamePublicKeyBlob();

                if (elBlob != null)
                {
                    publicKeyBlob.PublicKey = System.Security.Util.Hex.DecodeHexString(elBlob);
                }
                else
                {
                    throw new ArgumentException(Environment.GetResourceString("Argument_BlobCannotBeNull"));
                }

                m_publicKeyBlob = publicKeyBlob;

                if ((Object)m_version != null && m_name != null && m_publicKeyBlob != null)
                {
                    m_element = null;
                }
            }
        }
 /// <include file='doc\StrongNameMembershipCondition.uex' path='docs/doc[@for="StrongNameMembershipCondition.StrongNameMembershipCondition"]/*' />
 public StrongNameMembershipCondition( StrongNamePublicKeyBlob blob,
                                       String name,
                                       Version version )
 {
     if (blob == null)
         throw new ArgumentNullException( "blob" );
 
     m_publicKeyBlob = blob;
     m_name = name;
     m_version = version;
 }
Exemplo n.º 4
0
        /// <include file='doc\StrongNameMembershipCondition.uex' path='docs/doc[@for="StrongNameMembershipCondition.StrongNameMembershipCondition"]/*' />
        public StrongNameMembershipCondition(StrongNamePublicKeyBlob blob,
                                             String name,
                                             Version version)
        {
            if (blob == null)
            {
                throw new ArgumentNullException("blob");
            }

            m_publicKeyBlob = blob;
            m_name          = name;
            m_version       = version;
        }
        public StrongNameMembershipCondition( StrongNamePublicKeyBlob blob,
                                              String name,
                                              Version version )
        {
            if (blob == null)
                throw new ArgumentNullException( "blob" );

            if (name != null && name.Equals( "" ))
                throw new ArgumentException( Environment.GetResourceString( "Argument_EmptyStrongName" ) );      

            m_publicKeyBlob = blob;
            m_name = name;
            m_version = version;
        }
Exemplo n.º 6
0
        /// <include file='doc\StrongNameMembershipCondition.uex' path='docs/doc[@for="StrongNameMembershipCondition.StrongNameMembershipCondition"]/*' />
        public StrongNameMembershipCondition(StrongNamePublicKeyBlob blob,
                                             String name,
                                             Version version)
        {
            if (blob == null)
            {
                throw new ArgumentNullException("blob");
            }

            // Add this in Whidbey
            // if (name != null && name.Equals( "" ))
            //     throw new ArgumentException( Environment.GetResourceString( "Argument_EmptyStrongName" ) );

            m_publicKeyBlob = blob;
            m_name          = name;
            m_version       = version;
        }
Exemplo n.º 7
0
        /// <include file='doc\StrongNameMembershipCondition.uex' path='docs/doc[@for="StrongNameMembershipCondition.FromXml1"]/*' />
        public void FromXml(SecurityElement e, PolicyLevel level)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            if (!e.Tag.Equals("IMembershipCondition"))
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_MembershipConditionElement"));
            }

            lock (this)
            {
                m_name          = null;
                m_publicKeyBlob = null;
                m_version       = null;
                m_element       = e;
            }
        }
        private void ParseKeyBlob()
        {
            lock (this)
            {
                if (m_element == null)
                    return;

                String elBlob = m_element.Attribute( s_tagPublicKeyBlob );
                StrongNamePublicKeyBlob publicKeyBlob = new StrongNamePublicKeyBlob();
            
                if (elBlob != null)
                    publicKeyBlob.PublicKey = System.Security.Util.Hex.DecodeHexString( elBlob );
                else
                    throw new ArgumentException( Environment.GetResourceString( "Argument_BlobCannotBeNull" ) );

                m_publicKeyBlob = publicKeyBlob;

                if ((Object) m_version != null && m_name != null && m_publicKeyBlob != null)
                {
                    m_element = null;
                }
            }    
        }    
 public void FromXml( SecurityElement e, PolicyLevel level )
 {
     if (e == null)
         throw new ArgumentNullException("e");
 
     if (!e.Tag.Equals( "IMembershipCondition" ))
     {
         throw new ArgumentException( Environment.GetResourceString( "Argument_MembershipConditionElement" ) );
     }
     Contract.EndContractBlock();
     
     lock (this)
     {
         m_name = null;
         m_publicKeyBlob = null;
         m_version = null;
         m_element = e;
     }
 }
 public StrongNameMembershipCondition(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, Version version)
 {
     Contract.Requires(blob != null);
     return(default(StrongNameMembershipCondition));
 }
Exemplo n.º 11
0
 public StrongNameMembershipCondition(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, System.Version version)
 {
 }
 // Constructors
 public StrongName(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, System.Version version)
 {
 }