Example #1
0
        public void SetAssemblyName(int start, int length = -1)
        {
            if (m_AssemblyName != null)
            {
                throw TypeNameParserCommon.NewError(TypeNameError.AssemblyNameAlreadyDefined, m_Text, -1, TypeNameToken.AssemblyName);
            }

            m_AssemblyName          = new TypeNameBlock(m_Text, TypeNameBlockType.AssemblyName, start, length);
            m_AssemblyName.Changed += ScopeChanged;

            ScopeChanged(this, EventArgs.Empty);
        }
Example #2
0
        public void SetPublicKeyToken(int start, int length = -1)
        {
            if (m_PublicKeyToken != null)
            {
                throw TypeNameParserCommon.NewError(TypeNameError.AssemblyPublicKeyTokenAlreadyDefined, m_Text, -1, TypeNameToken.PublicKeyToken);
            }

            if (AssemblyName == null)
            {
                throw TypeNameParserCommon.NewError(TypeNameError.CannotDefinePublicKeyTokenBeforeAssemblyName, m_Text, -1, TypeNameToken.PublicKeyToken);
            }

            m_PublicKeyToken          = new TypeNameBlock(m_Text, TypeNameBlockType.PublicKeyToken, start, length);
            m_PublicKeyToken.Changed += ScopeChanged;

            ScopeChanged(this, EventArgs.Empty);
        }
Example #3
0
        public void SetCulture(int start, int length = -1)
        {
            if (m_Culture != null)
            {
                throw TypeNameParserCommon.NewError(TypeNameError.AssemblyCultureAlreadyDefined, m_Text, -1, TypeNameToken.Culture);
            }

            if (AssemblyName == null)
            {
                throw TypeNameParserCommon.NewError(TypeNameError.CannotDefineCultureBeforeAssemblyName, m_Text, -1, TypeNameToken.Culture);
            }

            m_Culture          = new TypeNameBlock(m_Text, TypeNameBlockType.Culture, start, length);
            m_Culture.Changed += ScopeChanged;

            ScopeChanged(this, EventArgs.Empty);
        }