BuildPropertyTranslationUnit() public static method

public static BuildPropertyTranslationUnit ( VisibilityToken visibility, string returnType, string name, ITranslationUnit getStatements = null, ITranslationUnit setStatements = null ) : ITranslationUnit
visibility VisibilityToken
returnType string
name string
getStatements ITranslationUnit
setStatements ITranslationUnit
return ITranslationUnit
Example #1
0
        public string RenderSimpleEmptyProperty()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildPropertyTranslationUnit(
                VisibilityToken.Public, "int", "SimpleProperty");

            return(translationUnit.Translate());
        }
Example #2
0
        public string RenderSimpleProperty()
        {
            ITranslationUnit translationUnit = TranslationUnitBuilder.BuildPropertyTranslationUnit(
                VisibilityToken.Public,
                "int",
                "SimpleProperty",
                new ITranslationUnit[] {
                TranslationUnitBuilder.BuildVariableDeclarationTranslationUnit(Lexems.NumberType, "variable1"),
                TranslationUnitBuilder.BuildVariableDeclarationTranslationUnit(Lexems.StringType, "variable2")
            },
                new ITranslationUnit[] {
                TranslationUnitBuilder.BuildVariableDeclarationTranslationUnit(Lexems.NumberType, "variable1"),
                TranslationUnitBuilder.BuildVariableDeclarationTranslationUnit(Lexems.StringType, "variable2")
            });

            return(translationUnit.Translate());
        }