diff --git a/readme.md b/readme.md index 5c61da02..52b2bae4 100644 --- a/readme.md +++ b/readme.md @@ -388,6 +388,8 @@ generated `ThisAssembly` class. Otherwise, it will be generated in the global na + + # Dogfooding [![CI Version](https://img.shields.io/endpoint?url=https://shields.kzu.io/vpre/Stunts/main&label=nuget.ci&color=brightgreen)](https://pkg.kzu.io/index.json) diff --git a/src/ThisAssembly.AssemblyInfo/readme.md b/src/ThisAssembly.AssemblyInfo/readme.md index a9d02720..36db3139 100644 --- a/src/ThisAssembly.AssemblyInfo/readme.md +++ b/src/ThisAssembly.AssemblyInfo/readme.md @@ -19,9 +19,7 @@ on the `ThisAssembly.Info` class. ![](https://raw.githubusercontent.com/devlooped/ThisAssembly/main/img/ThisAssembly.AssemblyInfo.png) -Set the `$(ThisAssemblyNamespace)` MSBuild property to set the root namespace of the -generated `ThisAssembly` class. Otherwise, it will be generated in the global namespace. - + \ No newline at end of file diff --git a/src/ThisAssembly.Constants/readme.md b/src/ThisAssembly.Constants/readme.md index b251e2c9..3f8c81ad 100644 --- a/src/ThisAssembly.Constants/readme.md +++ b/src/ThisAssembly.Constants/readme.md @@ -30,7 +30,6 @@ via environment variables or command line arguments. For example: The C# code could consume this constant as follows: ```csharp - public HttpClient CreateHttpClient(string name, int? timeout = default) { HttpClient client = httpClientFactory.CreateClient(name); @@ -65,9 +64,7 @@ Which results in: ![](https://raw.githubusercontent.com/devlooped/ThisAssembly/main/img/ThisAssembly.Constants2.png) -Set the `$(ThisAssemblyNamespace)` MSBuild property to set the root namespace of the -generated `ThisAssembly` class. Otherwise, it will be generated in the global namespace. - + \ No newline at end of file diff --git a/src/ThisAssembly.Git/readme.md b/src/ThisAssembly.Git/readme.md index 29d7b769..64da7712 100644 --- a/src/ThisAssembly.Git/readme.md +++ b/src/ThisAssembly.Git/readme.md @@ -70,10 +70,7 @@ packaging experience possible: ``` -Set the `$(ThisAssemblyNamespace)` MSBuild property to set the root namespace of the -generated `ThisAssembly` class. Otherwise, it will be generated in the global namespace. - - + \ No newline at end of file diff --git a/src/ThisAssembly.Metadata/readme.md b/src/ThisAssembly.Metadata/readme.md index 13d5b4b7..1d5e30d0 100644 --- a/src/ThisAssembly.Metadata/readme.md +++ b/src/ThisAssembly.Metadata/readme.md @@ -22,9 +22,7 @@ The metadata attribute can alternatively be declared using MSBuild syntax in the ``` -Set the `$(ThisAssemblyNamespace)` MSBuild property to set the root namespace of the -generated `ThisAssembly` class. Otherwise, it will be generated in the global namespace. - + \ No newline at end of file diff --git a/src/ThisAssembly.Project/readme.md b/src/ThisAssembly.Project/readme.md index fdfd3c27..2617e37c 100644 --- a/src/ThisAssembly.Project/readme.md +++ b/src/ThisAssembly.Project/readme.md @@ -17,9 +17,7 @@ them as `ProjectProperty` MSBuild items in the project file, such as: ![](https://raw.githubusercontent.com/devlooped/ThisAssembly/main/img/ThisAssembly.Project.png) -Set the `$(ThisAssemblyNamespace)` MSBuild property to set the root namespace of the -generated `ThisAssembly` class. Otherwise, it will be generated in the global namespace. - + \ No newline at end of file diff --git a/src/ThisAssembly.Resources/readme.md b/src/ThisAssembly.Resources/readme.md index af1a7019..104cd99f 100644 --- a/src/ThisAssembly.Resources/readme.md +++ b/src/ThisAssembly.Resources/readme.md @@ -43,9 +43,7 @@ treated as a text file: You can also add a `Comment` item metadata attribute, which will be used as the `` XML doc for the generated member. -Set the `$(ThisAssemblyNamespace)` MSBuild property to set the root namespace of the -generated `ThisAssembly` class. Otherwise, it will be generated in the global namespace. - + \ No newline at end of file diff --git a/src/ThisAssembly.Strings/readme.md b/src/ThisAssembly.Strings/readme.md index b1fefc8a..12e145c1 100644 --- a/src/ThisAssembly.Strings/readme.md +++ b/src/ThisAssembly.Strings/readme.md @@ -68,9 +68,7 @@ partial class ThisAssembly } ``` -Set the `$(ThisAssemblyNamespace)` MSBuild property to set the root namespace of the -generated `ThisAssembly` class. Otherwise, it will be generated in the global namespace. - + \ No newline at end of file diff --git a/src/ThisAssembly/readme.md b/src/ThisAssembly/readme.md index 80f92c53..d73ba52e 100644 --- a/src/ThisAssembly/readme.md +++ b/src/ThisAssembly/readme.md @@ -22,5 +22,6 @@ ## ThisAssembly.Strings + \ No newline at end of file diff --git a/src/visibility.md b/src/visibility.md new file mode 100644 index 00000000..bf06b92b --- /dev/null +++ b/src/visibility.md @@ -0,0 +1,16 @@ +## Customizing the generated class + +Set the `$(ThisAssemblyNamespace)` MSBuild property to set the namespace of the +generated `ThisAssembly` root class. Otherwise, it will be generated in the global namespace. + +All generated classes are partial and have no visibility modifier, so they can be extended +manually with another partial that can add members or modify their visibility to make them +public, if needed. The C# default for this case is for all classes to be internal. + +```csharp +// makes the generated classes public +public partial ThisAssembly +{ + public partial class Constants { } +} +```