From a6d82cb97181b4cbd9cf8d7d13c077ecf53e59ca Mon Sep 17 00:00:00 2001 From: Corniel Nobel Date: Wed, 30 Oct 2024 08:33:01 +0100 Subject: [PATCH] Update documentation. --- specs/Qowaiv.CodeGeneration.Specs/Reflection_specs.cs | 2 +- .../Extensions/Qowaiv.CodeGeneration.TypeBase.cs | 7 ++++++- src/Qowaiv.CodeGeneration/IO/CodeFileWriter.cs | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/specs/Qowaiv.CodeGeneration.Specs/Reflection_specs.cs b/specs/Qowaiv.CodeGeneration.Specs/Reflection_specs.cs index 3da2cc4..9837699 100644 --- a/specs/Qowaiv.CodeGeneration.Specs/Reflection_specs.cs +++ b/specs/Qowaiv.CodeGeneration.Specs/Reflection_specs.cs @@ -12,7 +12,7 @@ public void Is_nullable_when_marked() public void Is_not_nullable_when_not_marked() => typeof(Model).GetProperty(nameof(Model.NotNullable))!.IsNullable().Should().BeFalse(); - class Model + internal class Model { public object? Nullable { get; } diff --git a/src/Qowaiv.CodeGeneration/Extensions/Qowaiv.CodeGeneration.TypeBase.cs b/src/Qowaiv.CodeGeneration/Extensions/Qowaiv.CodeGeneration.TypeBase.cs index 2953ea6..ba0772e 100644 --- a/src/Qowaiv.CodeGeneration/Extensions/Qowaiv.CodeGeneration.TypeBase.cs +++ b/src/Qowaiv.CodeGeneration/Extensions/Qowaiv.CodeGeneration.TypeBase.cs @@ -2,10 +2,15 @@ namespace Qowaiv.CodeGeneration; +/// Extensions on . public static class TypeBaseExtensions { + /// Gets all types including their usings/dependencies. + /// + /// That includes all their properties, base classes and derived types. + /// [Pure] - public static IReadOnlyCollection IncludeUsings(this IEnumerable? codes) + public static IReadOnlyCollection IncludeUsings(this IEnumerable codes) { var types = new HashSet(new TypeNameEqualityComparer()); diff --git a/src/Qowaiv.CodeGeneration/IO/CodeFileWriter.cs b/src/Qowaiv.CodeGeneration/IO/CodeFileWriter.cs index 2f56021..8cb1887 100644 --- a/src/Qowaiv.CodeGeneration/IO/CodeFileWriter.cs +++ b/src/Qowaiv.CodeGeneration/IO/CodeFileWriter.cs @@ -2,8 +2,10 @@ namespace Qowaiv.CodeGeneration.IO; +/// Writes to file. public static class CodeFileWriter { + /// Saves the applying writer settings. public static void Save(this IEnumerable code, CodeFileWriterSettings codeFileSettings, CSharpWriterSettings? csharpSettings = null) { Guard.NotNull(code);