Beispiel #1
0
        internal DefaultAssemblyName(ReflectionAssemblyName assemblyName)
        {
            _name = assemblyName.Name;
            if (string.IsNullOrEmpty(assemblyName.CultureName))
            {
                _cultureName = "neutral";
            }
            else
            {
                _cultureName = assemblyName.CultureName;
            }

            var pk = assemblyName.GetPublicKey();

            if (pk != null)
            {
                _publicKeyBlob = new Blob(pk);
            }

            pk = assemblyName.GetPublicKeyToken();
            if (pk != null)
            {
                _pkt = new Blob(pk);
            }

            _version = assemblyName.Version;
        }
Beispiel #2
0
        /*
         * public String SimpleName
         * {
         *  get { return m_SimpleName; }
         * }
         *
         * public String Culture
         * {
         *  get { return m_Culture; }
         * }
         */

        public AssemblyInfo(System.Reflection.AssemblyName AN)
        {
            m_Version = AN.Version;
            m_Flags   = (UInt32)AN.Flags;
            byte[] Token;
            if ((m_Flags & (UInt32)System.Reflection.AssemblyNameFlags.PublicKey) == 0)
            {
                Token = AN.GetPublicKeyToken();
            }
            else
            {
                Token = AN.GetPublicKey();
            }
            if ((Token != null) && (Token.Length == 0))
            {
                m_PublicKey = null;
            }
            else
            {
                m_PublicKey = Token;
            }
            m_SimpleName = AN.Name;
            m_Culture    = AN.CultureInfo.Name;
            if (m_Culture.Length == 0)
            {
                m_Culture = null;
            }
            m_FullName       = null;
            m_PublicKeyToken = null;
        }
Beispiel #3
0
 public byte[] GetPublicKey()
 {
     return(name.GetPublicKey());
 }