Example #1
0
        /// <include file='doc\ProvideLanguageServiceAttribute.uex' path='docs/doc[@for="ProvideLanguageServiceAttribute.ProvideLanguageServiceAttribute"]' />
        /// <devdoc>
        /// Registers a language service.
        /// </devdoc>
        /// <param name="languageService"></param>
        /// <param name="strLanguageName"></param>
        /// <param name="languageResourceID"></param>
        public ProvideLanguageServiceAttribute(
            object languageService,
            string strLanguageName,
            int languageResourceID)
        {
            if (languageService is Type)
            {
                this.languageServiceGuid = ((Type)languageService).GUID;
            }
            else if (languageService is string)
            {
                this.languageServiceGuid = new Guid((string)languageService);
            }
            else
            {
                throw new ArgumentException();
            }
            this.strLanguageName    = strLanguageName;
            this.languageResourceID = languageResourceID;

            debuggerLanguages = new DebuggerLanguages(strLanguageName);
            optionsTable      = new Hashtable();
        }
        /// <include file='doc\ProvideLanguageServiceAttribute.uex' path='docs/doc[@for="ProvideLanguageServiceAttribute.ProvideLanguageServiceAttribute"]' />
        /// <devdoc>
        /// Registers a language service.
        /// </devdoc>
        /// <param name="languageService"></param>
        /// <param name="strLanguageName"></param>
        /// <param name="languageResourceID"></param>
        public ProvideLanguageServiceAttribute(
            object languageService,
            string strLanguageName,
            int languageResourceID)
        {
            if (languageService is Type)
                this.languageServiceGuid = ((Type)languageService).GUID;
            else if (languageService is string)
                this.languageServiceGuid = new Guid((string)languageService);
            else
                throw new ArgumentException();
            this.strLanguageName     = strLanguageName;
            this.languageResourceID  = languageResourceID;

            debuggerLanguages   = new DebuggerLanguages(strLanguageName);
            optionsTable = new Hashtable();
        }