示例#1
0
        public string RenderSimpleEmptyMethod()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMethodTranslationUnit(
                VisibilityToken.Public, null, "SimpleEmptyMethod");

            return(translationUnit.Translate());
        }
示例#2
0
        public string RenderEmptyMethodWithReturn()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMethodTranslationUnit(
                VisibilityToken.Public, "string", "EmptyMethodWithReturn");

            return(translationUnit.Translate());
        }
示例#3
0
        public string RenderSimpleEmptyClass()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildClassTranslationUnit(
                VisibilityToken.Public, "SimpleEmptyClass", null);

            return(translationUnit.Translate());
        }
示例#4
0
        public string RenderSimpleEmptyInterface()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildInterfaceTranslationUnit(
                ModifierTokens.Public, "SimpleEmptyInterface");

            return(translationUnit.Translate());
        }
示例#5
0
        public string StringMember()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMemberTranslationUnit(
                ModifierTokens.None, Lexems.StringType, "stringMember");

            return(translationUnit.Translate());
        }
示例#6
0
        public string RenderEmptyProtectedInternalStaticMethod()
        {
            var translationUnit = TranslationUnitBuilder.BuildMethodTranslationUnit(
                VisibilityToken.Protected | VisibilityToken.Internal | VisibilityToken.Static, null, "EmptyProtectedInternalStatic") as MethodDeclarationTranslationUnit;

            return(translationUnit.Translate());
        }
示例#7
0
        public string IntPrivateMember()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMemberTranslationUnit(
                ModifierTokens.Private, Lexems.NumberType, "intMember");

            return(translationUnit.Translate());
        }
示例#8
0
        public string StringMember()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMemberTranslationUnit(
                VisibilityToken.None, "string", "stringMember");

            return(translationUnit.Translate());
        }
示例#9
0
        public string IntPrivateMember()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMemberTranslationUnit(
                VisibilityToken.Private, "int", "intMember");

            return(translationUnit.Translate());
        }
示例#10
0
        public string RenderSimpleEmptyConstructor()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildConstructorTranslationUnit(
                VisibilityToken.Public);

            return(translationUnit.Translate());
        }
示例#11
0
        public string RenderEmptyProtectedInternalStaticMethod()
        {
            var translationUnit = TranslationUnitBuilder.BuildMethodTranslationUnit(
                ModifierTokens.Protected | ModifierTokens.Internal | ModifierTokens.Static, null, "EmptyProtectedInternalStatic") as MethodDeclarationTranslationUnit;

            return(translationUnit.Translate());
        }
示例#12
0
        public string RenderSimpleEmptyProperty()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildPropertyTranslationUnit(
                VisibilityToken.Public, "int", "SimpleProperty");

            return(translationUnit.Translate());
        }
示例#13
0
        public string RenderSimpleEmptyClass()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildClassTranslationUnit(
                ModifierTokens.Public, "SimpleEmptyClass", null);

            return(translationUnit.Translate());
        }
示例#14
0
        public string StringPublicMember()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMemberTranslationUnit(
                VisibilityToken.Public, Lexems.StringType, "stringMember");

            return(translationUnit.Translate());
        }
示例#15
0
        public string RenderEmptyClassWithInheritance()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildClassTranslationUnit(
                ModifierTokens.Public, "EmptyClassWithInheritance", "BaseClass");

            return(translationUnit.Translate());
        }
示例#16
0
        public string RenderEmptyPublicStaticMethod()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMethodTranslationUnit(
                ModifierTokens.Public | ModifierTokens.Static, null, "EmptyPublicStaticMethod");

            return(translationUnit.Translate());
        }
示例#17
0
        public string RenderSimpleEmptyMethod()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMethodSignatureTranslationUnit(
                ModifierTokens.Public, null, "SimpleMethodSignature");

            return(translationUnit.Translate());
        }
示例#18
0
        public string RenderSimpleEmptyConstructor()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildConstructorTranslationUnit(
                ModifierTokens.Public);

            return(translationUnit.Translate());
        }
示例#19
0
        public string RenderSimpleEmptyInterface()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildInterfaceTranslationUnit(
                VisibilityToken.Public, "SimpleEmptyInterface");

            return(translationUnit.Translate());
        }
示例#20
0
        public string RenderEmptyMethodWithReturn()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMethodSignatureTranslationUnit(
                ModifierTokens.Public, Lexems.StringType, "MethodSignatureWithReturn");

            return(translationUnit.Translate());
        }
示例#21
0
        public string RenderSimpleEmptyNoVisibilityMethod()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildMethodTranslationUnit(
                ModifierTokens.None, null, "SimpleEmptyMethod");

            return(translationUnit.Translate());
        }
示例#22
0
        public string RenderSimpleEmptyClassInModule()
        {
            var translationUnit = TranslationUnitBuilder.BuildModuleTranslationUnit("MyNamespace") as ModuleTranslationUnit;

            translationUnit.AddClass("SimpleClass");

            return(translationUnit.Translate());
        }
示例#23
0
        public string RenderEmptyConstructor1Argument()
        {
            var translationUnit = TranslationUnitBuilder.BuildConstructorTranslationUnit(
                VisibilityToken.Public) as MethodDeclarationTranslationUnit;

            translationUnit.AddArgument(ArgumentDefinitionTranslationUnit.Create(
                                            TypeIdentifierTranslationUnit.Number, IdentifierTranslationUnit.Create("param1")));

            return(translationUnit.Translate());
        }
示例#24
0
        public string RenderEmptyInterfaceWithOneExtendedInterface()
        {
            var translationUnit = TranslationUnitBuilder.BuildInterfaceTranslationUnit(
                VisibilityToken.Public, "EmptyInterfaceWithOneExtendedInterface")
                                  as InterfaceDeclarationTranslationUnit;

            translationUnit.AddExtendedInterface("Interface1");

            return(translationUnit.Translate());
        }
示例#25
0
        public string RenderEmptyMethod1Argument()
        {
            var translationUnit = TranslationUnitBuilder.BuildMethodSignatureTranslationUnit(
                ModifierTokens.Public, null, "MethodSignature1Argument") as MethodSignatureDeclarationTranslationUnit;

            translationUnit.AddArgument(ArgumentDefinitionTranslationUnit.Create(
                                            TypeIdentifierTranslationUnit.Number, IdentifierTranslationUnit.Create("param1")));

            return(translationUnit.Translate());
        }
示例#26
0
        public string RenderEmptyClassWithOneInterface()
        {
            var translationUnit = TranslationUnitBuilder.BuildClassTranslationUnit(
                ModifierTokens.Public, "EmptyClassWithOneInterface", null)
                                  as ClassDeclarationTranslationUnit;

            translationUnit.AddInterface("Interface1");

            return(translationUnit.Translate());
        }
示例#27
0
        public string RenderReferencesGroup()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildReferencesGroupTranslationUnit(new[] 
            {
                "file1.ts",
                "file2.ts",
                "file3.ts"
            });

            return translationUnit.Translate();
        }
示例#28
0
        public string RenderInterfaceWithSignatures()
        {
            var translationUnit = TranslationUnitBuilder.BuildInterfaceTranslationUnit(
                VisibilityToken.Public, "ClassWithEmptyMethods")
                                  as InterfaceDeclarationTranslationUnit;

            translationUnit.AddSignature("Method1");
            translationUnit.AddSignature("Method2");
            translationUnit.AddSignature("Method3");

            return(translationUnit.Translate());
        }
示例#29
0
        public string RenderClassWithEmptyMethods()
        {
            var translationUnit = TranslationUnitBuilder.BuildClassTranslationUnit(
                ModifierTokens.Public, "ClassWithEmptyMethods", null)
                                  as ClassDeclarationTranslationUnit;

            translationUnit.AddEmptyMethod("Method1");
            translationUnit.AddEmptyMethod("Method2");
            translationUnit.AddEmptyMethod("Method3");

            return(translationUnit.Translate());
        }
示例#30
0
        public string RenderEmptyClassWithInheritanceAndManyInterface()
        {
            var translationUnit = TranslationUnitBuilder.BuildClassTranslationUnit(
                ModifierTokens.Public, "EmptyClassWithInheritanceAndManyInterface", "BaseClass")
                                  as ClassDeclarationTranslationUnit;

            translationUnit.AddInterface("Interface1");
            translationUnit.AddInterface("Interface2");
            translationUnit.AddInterface("Interface3");

            return(translationUnit.Translate());
        }