Skip to content

Commit

Permalink
Dox
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveWilkes committed Jun 28, 2021
1 parent 86473e7 commit 5216a50
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/api/Building-Attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BuildableExpression.SourceCode(sc =>
sc.AddAttribute("MyAttribute", attr =>
{
// Set attribute options if desired:
// attr.SetSummary("Attribute description");
// attr.AddAttribute<SomeAttribute>();
// attr.SetAbstract();
// attr.SetSealed();
Expand All @@ -24,6 +25,7 @@ BuildableExpression.SourceCode(sc =>

Members are added via the attribute API, which supports:

- [Documentation](/api/Documentation)
- [Constructors](/api/Building-Constructors)
- [Fields](/api/Building-Fields)
- [Properties](/api/Building-Properties)
Expand Down
2 changes: 2 additions & 0 deletions docs/src/api/Building-Classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BuildableExpression.SourceCode(sc =>
sc.AddClass("MyClass", cls =>
{
// Set class options if desired:
// cls.SetSummary("Class description");
// cls.AddAttribute(typeof(SomeAttribute));
// cls.SetVisibility(TypeVisibility.Internal);
// cls.SetStatic();
Expand All @@ -26,6 +27,7 @@ BuildableExpression.SourceCode(sc =>

Members are added via the class API, which supports:

- [Documentation](/api/Documentation)
- [Constructors](/api/Building-Constructors)
- [Fields](/api/Building-Fields)
- [Properties](/api/Building-Properties)
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/Building-Enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BuildableExpression.SourceCode(sc =>
sc.AddEnum("OddNumbers", enm =>
{
// Set enum options if desired:
// enm.SetSummary("Enum description");
// enm.AddAttribute(typeof(SomeAttribute));
// enm.SetVisibility(TypeVisibility.Internal);
// enm.SetPartial();
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/Building-Fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BuildableExpression.SourceCode(sc =>
cls.AddField<string>("StringField", f =>
{
// Set field options if desired:
// f.SetSummary("Field description");
// f.AddAttribute(typeof(SomeAttribute));
// f.SetVisibility(MemberVisibility.Internal);
// f.SetStatic();
Expand Down
2 changes: 2 additions & 0 deletions docs/src/api/Building-Interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BuildableExpression.SourceCode(sc =>
sc.AddInterface("IMyInterface", itf =>
{
// Set interface options if desired:
// itf.SetSummary("Interface description");
// itf.AddAttribute<SomeAttribute>();
// itf.SetVisibility(TypeVisibility.Internal);
// itf.SetPartial();
Expand All @@ -23,6 +24,7 @@ BuildableExpression.SourceCode(sc =>

Members are added via the interface API, which supports:

- [Documentation](/api/Documentation)
- [Properties](/api/Building-Properties)
- [Methods](/api/Building-Methods)
- [Attributes](/api/Building-Attributes)
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/Building-Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ BuildableExpression.SourceCode(sc =>
cls.AddProperty<int>("IntValue", p =>
{
// Set property options if desired:
// p.SetSummary("Property description");
// p.AddAttribute(typeof(SomeAttribute));
// p.SetVisibility(MemberVisibility.Internal);
// p.SetStatic();
Expand Down
2 changes: 2 additions & 0 deletions docs/src/api/Building-Structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BuildableExpression.SourceCode(sc =>
sc.AddStruct("MyStruct", str =>
{
// Set struct options if desired:
// str.SetSummary("Struct description");
// str.AddAttribute(typeof(SomeAttribute));
// str.SetVisibility(TypeVisibility.Internal);
// str.SetPartial();
Expand All @@ -23,6 +24,7 @@ BuildableExpression.SourceCode(sc =>

Members are added via the struct API, which supports:

- [Documentation](/api/Documentation)
- [Constructors](/api/Building-Constructors)
- [Fields](/api/Building-Fields)
- [Properties](/api/Building-Properties)
Expand Down
33 changes: 33 additions & 0 deletions docs/src/api/Documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
To add a triple-slash XML documentation summary to a generated [class](/api/Building-Classes),
[struct](/api/Building-Struct), [interface](/api/Building-Interfaces), [enum](/api/Building-Enums),
[attribute](/api/Building-Attributes), [field](/api/Building-Fields), [property](/api/Building-Properties)
or [method](/api/Building-Methods), use:

```cs
BuildableExpression.SourceCode(sc =>
{
sc.AddClass("MyClass", cls =>
{
cls.SetSummary(
"This is my generated class, " +
"and it's pretty special");
});
});
```

## File Headers

To add a file header to a generated c# source code file, use:

```cs
BuildableExpression.SourceCode(sc =>
{
sc.SetHeader($@"
// - - - - - - - - - - - - - - - - - - - - -
// This is generated code.
// Generated on: {DateTime.Now}
// Don't change this file directly, as your
// changes may be overwritten.
// - - - - - - - - - - - - - - - - - - - - -");
});
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ nav:
- Methods: api/Building-Methods.md
- Fields: api/Building-Fields.md
- Properties: api/Building-Properties.md
- Documentation: api/Documentation.md

theme: readthedocs

0 comments on commit 5216a50

Please sign in to comment.