public void FieldAndPropertyGenerated() { var provider = CodeDomProvider.CreateProvider("C#"); var field = CreateBoolField(); var property = CreateBoolProperty(); string output = IndentHelpers.GenerateIndentedClassCode(provider, field, property); output = FixOutput(output); string expectedOutput = FixOutput(MethodAndFieldGeneratedOutput); Assert.Equal(expectedOutput, output); }
public static CodeSnippetTypeMember AddSnippetMember(this CodeTypeDeclaration type, string value, CodeLinePragma location = null) => type.AddMember(IndentHelpers.CreateSnippetMember(value, location));
public static string IndentSnippetText(string text, string indent) => IndentHelpers.IndentSnippetText(text, indent);
public static string IndentSnippetText(CodeDomProvider provider, string text, string indent) => IndentHelpers.IndentSnippetText(provider, text, indent);
public static string GenerateIndentedClassCode(CodeDomProvider provider, IEnumerable <CodeTypeMember> members) => IndentHelpers.GenerateIndentedClassCode(provider, members);
public static string GenerateIndentedClassCode(CodeDomProvider provider, params CodeTypeMember[] members) => IndentHelpers.GenerateIndentedClassCode(provider, members);
public static void GenerateCodeFromMembers(CodeDomProvider provider, CodeGeneratorOptions options, StringWriter sw, IEnumerable <CodeTypeMember> members) => IndentHelpers.GenerateCodeFromMembers(provider, options, sw, members);