public static IVariableDeclaration CreateVariableDeclaration(DTE dteInstance)
        {
            string codeModelLanguageConstant = CodeModelLanguageHelper.GetCodeModelLanguageConstant(dteInstance);

            switch (codeModelLanguageConstant)
            {
            case EnvDTE.CodeModelLanguageConstants.vsCMLanguageVB:

                return(new Vb.VbVariableDeclaration());

            case EnvDTE.CodeModelLanguageConstants.vsCMLanguageCSharp:

                return(new Csharp.CsharpVariableDeclaration());

            default:
                throw new NotImplementedException(String.Concat("Code language not implemented: ", codeModelLanguageConstant.ToString()));
            }
        }
Exemplo n.º 2
0
        public static Expressions CreateExpressions(DTE dteInstance)
        {
            string codeModelLanguageConstant = CodeModelLanguageHelper.GetCodeModelLanguageConstant(dteInstance);

            switch (codeModelLanguageConstant)
            {
            case EnvDTE.CodeModelLanguageConstants.vsCMLanguageVB:

                return(new Zinc.CarbonCopy.LanguageSpecific.Vb.VbExpressions());

            case EnvDTE.CodeModelLanguageConstants.vsCMLanguageCSharp:

                return(new Zinc.CarbonCopy.LanguageSpecific.Csharp.CsharpExpressions());

            default:
                throw new NotImplementedException(String.Concat("Code language not implemented: ", codeModelLanguageConstant.ToString()));
            }
        }
Exemplo n.º 3
0
        public static ILanguageSpecificObjectInitializationInstantiator CreateInstantiator(DTE dteInstance)
        {
            string codeModelLanguageConstant = CodeModelLanguageHelper.GetCodeModelLanguageConstant(dteInstance);

            switch (codeModelLanguageConstant)
            {
            case EnvDTE.CodeModelLanguageConstants.vsCMLanguageVB:

                return(new VbObjectInitializationInstantiator());

            case EnvDTE.CodeModelLanguageConstants.vsCMLanguageCSharp:

                return(new CsharpObjectInitializationInstantiator());

            default:
                throw new NotImplementedException(String.Concat("Code language not implemented: ", codeModelLanguageConstant.ToString()));
            }
        }