internal static void GenerateCodeFromType(CodeTypeDeclaration e, TextWriter w, CodeGeneratorOptions o)
        {
            WriteCodeCommentStatementCollection(e.Comments, w, o);

            GenerateCodeFromAttributeDeclarationCollection(e.CustomAttributes, w, o);

            var accessModifier           = ((e.TypeAttributes & System.Reflection.TypeAttributes.Public) == System.Reflection.TypeAttributes.Public) ? "export " : String.Empty;
            var typeOfType               = CodeObjectHelper.GetTypeOfType(e);
            var name                     = e.Name;
            var typeParametersExpression = CodeObjectHelper.GetTypeParametersExpression(e);
            var baseTypesExpression      = CodeObjectHelper.GetBaseTypeExpression(e);

            w.Write($"{o.IndentString}{accessModifier}{typeOfType} {name}{typeParametersExpression}{baseTypesExpression} {{");
            WriteTypeMembersAndCloseBracing(e, w, o);
        }
Example #2
0
 void ICodeGenerator.GenerateCodeFromType(CodeTypeDeclaration e, TextWriter w, CodeGeneratorOptions o)
 {
     CodeObjectHelper.GenerateCodeFromType(e, w, o);
 }
Example #3
0
 void ICodeGenerator.GenerateCodeFromNamespace(CodeNamespace e, TextWriter w, CodeGeneratorOptions o)
 {
     CodeObjectHelper.GenerateCodeFromNamespace(e, w, o, asModule);
 }
Example #4
0
 void ICodeGenerator.GenerateCodeFromStatement(CodeStatement e, TextWriter w, CodeGeneratorOptions o)
 {
     CodeObjectHelper.GenerateCodeFromStatement(e, w, o);
 }
Example #5
0
 void ICodeGenerator.GenerateCodeFromExpression(CodeExpression e, TextWriter w, CodeGeneratorOptions o)
 {
     CodeObjectHelper.GenerateCodeFromExpression(e, w, o);
 }