From d9700b82dcc0a5ccd85cef3e06a43c496215b73a Mon Sep 17 00:00:00 2001 From: Vazovsk1y Date: Sun, 1 Sep 2024 19:33:47 +0300 Subject: [PATCH 1/7] -included license file. --- .../Serilog.FluentDestructuring.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj b/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj index 5128c96..0996c09 100644 --- a/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj +++ b/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj @@ -13,6 +13,7 @@ git true README.md + LICENSE snupkg true @@ -22,6 +23,7 @@ + From b9f3a185aa353db77cc6bcf30c6ae2880afb4d93 Mon Sep 17 00:00:00 2001 From: Vazovsk1y Date: Sun, 8 Sep 2024 15:00:44 +0300 Subject: [PATCH 2/7] -modified package version extracting. --- .github/workflows/deploy-to-nuget.yml | 10 ++-- scripts/GetPackageVersion.ps1 | 24 --------- scripts/GetPackageVersion.psm1 | 52 +++++++++++++++++++ .../Serilog.FluentDestructuring.csproj | 2 +- 4 files changed, 57 insertions(+), 31 deletions(-) delete mode 100644 scripts/GetPackageVersion.ps1 create mode 100644 scripts/GetPackageVersion.psm1 diff --git a/.github/workflows/deploy-to-nuget.yml b/.github/workflows/deploy-to-nuget.yml index 73a2692..cfa3837 100644 --- a/.github/workflows/deploy-to-nuget.yml +++ b/.github/workflows/deploy-to-nuget.yml @@ -21,19 +21,17 @@ jobs: - name: Get package version. run: | + Import-Module ./scripts/GetPackageVersion.psm1 Write-Host "Github ref: $Env:GITHUB_REF" - $version = .\scripts\GetPackageVersion.ps1 -RowContainingPackageVersion $Env:GITHUB_REF + $version = GetVersionFromGitHubRef -GitHubRef $Env:GITHUB_REF + + Write-Host "Extracted version: '$version'" if ($version -eq $null) { Write-Error "Package version not found." exit 1 } - if ($Env:GITHUB_REF -notlike "*$version") { - Write-Error "Invalid branch title format." - exit 1 - } - echo "PACKAGE_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append shell: pwsh diff --git a/scripts/GetPackageVersion.ps1 b/scripts/GetPackageVersion.ps1 deleted file mode 100644 index 136b5f1..0000000 --- a/scripts/GetPackageVersion.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -param ( - [string]$RowContainingPackageVersion -) - -Function GetVersion { - Param ( - [string]$Row - ) - - if ($Row -match "(?\d+)(\.(?\d+))?(\.(?\d+))") { - - $Major = $matches['major'] - $Minor = $matches['minor'] - $Patch = $matches['patch'] - - $Version = "$Major.$Minor.$Patch" - - return $Version - } else { - return $null - } -} - -GetVersion -Row $RowContainingPackageVersion \ No newline at end of file diff --git a/scripts/GetPackageVersion.psm1 b/scripts/GetPackageVersion.psm1 new file mode 100644 index 0000000..850de63 --- /dev/null +++ b/scripts/GetPackageVersion.psm1 @@ -0,0 +1,52 @@ +Function GetVersionFromGitHubRef { + Param ( + # Last segment of ref path must be a valid semver string. + # Ex: + # refs/tags/client/v[semver_string] + # refs/heads/release/[semver_string] + # refs/heads/release/client/v[semver_string] + # refs/heads/release/v[semver_string] + # refs/tags/v[semver_string] + # refs/tags/[semver_string] + # ... + + [string]$GitHubRef + ) + + $separator = '/' + $segments = $GitHubRef -split $separator + $versionSegment = $segments[-1] + + Write-Host "Version segment: '$versionSegment'" + + # SemVer Regex with optional 'v' character at the beginning. + $versionRegex = '^(v)?(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' + + if ($versionSegment -match $versionRegex) { + + if ($matches -eq $null) { + return $null + } + + $MajorTag = $matches['major'] + $MinorTag = $matches['minor'] + $PatchTag = $matches['patch'] + + $PreReleaseTag = $matches['prerelease'] + $BuildMetadataTag = $matches['buildmetadata'] + + $Version = "$MajorTag.$MinorTag.$PatchTag" + + if ($PreReleaseTag) { + $Version += "-$PreReleaseTag" + } + + if ($BuildMetadataTag) { + $Version += "+$BuildMetadataTag" + } + + return $Version + } else { + return $null + } +} \ No newline at end of file diff --git a/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj b/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj index 0996c09..da7ca04 100644 --- a/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj +++ b/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj @@ -23,7 +23,7 @@ - + From 52440fe0437783406716570da56abf8311791e6e Mon Sep 17 00:00:00 2001 From: Vazovsk1y Date: Sat, 11 Jan 2025 16:08:06 +0300 Subject: [PATCH 3/7] -moved to tag pushing based deploying strategy. --- .../{deploy-to-nuget.yml => deploy.yml} | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) rename .github/workflows/{deploy-to-nuget.yml => deploy.yml} (85%) diff --git a/.github/workflows/deploy-to-nuget.yml b/.github/workflows/deploy.yml similarity index 85% rename from .github/workflows/deploy-to-nuget.yml rename to .github/workflows/deploy.yml index cfa3837..214e6fa 100644 --- a/.github/workflows/deploy-to-nuget.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,12 @@ -name: Deploy to NuGet. +name: Deploy to NuGet and Release section. on: - create + push: + tags: + - "v*" + +permissions: + contents: write # For release creation. env: BUILD_CONFIGURATION: Release @@ -10,10 +15,8 @@ env: NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' jobs: - deploy_to_nuget: - + deploy: runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/heads/release/') steps: - name: Checkout. @@ -50,4 +53,9 @@ jobs: run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration ${{ env.BUILD_CONFIGURATION }} --include-symbols -p:PackageVersion=${{ env.PACKAGE_VERSION }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} - name: Push. - run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }} \ No newline at end of file + run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }} + + - name: Create release. + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true \ No newline at end of file From cdfaec0fc36747952ba23b8bc48d097414b53861 Mon Sep 17 00:00:00 2001 From: Vazovsk1y Date: Sun, 12 Jan 2025 16:34:03 +0300 Subject: [PATCH 4/7] -added issue related tests. --- .../FluentDestructuringPolicyTests.cs | 81 +++++++++++++++++++ .../TestFluentDestructuringPolicy.cs | 3 + .../Models/FluentDestructuringPolicyModel.cs | 10 ++- 3 files changed, 93 insertions(+), 1 deletion(-) diff --git a/tests/Serilog.FluentDestructuring.UnitTests/FluentDestructuringPolicyTests.cs b/tests/Serilog.FluentDestructuring.UnitTests/FluentDestructuringPolicyTests.cs index 577ff9e..c1e6aef 100644 --- a/tests/Serilog.FluentDestructuring.UnitTests/FluentDestructuringPolicyTests.cs +++ b/tests/Serilog.FluentDestructuring.UnitTests/FluentDestructuringPolicyTests.cs @@ -82,4 +82,85 @@ public void Null_Properties_Should_Be_Ignored_When_This_Is_Configured_With_Globa .Properties.ToDictionary(e => e.Name, e => e.Value).Should() .NotContainKey(nameof(WithoutConfigurationInnerModel.NullableInt32)); } + + #region Issue 2 + + // https://github.com/Vazovsk1y/Serilog.FluentDestructuring/issues/2 + + [Fact] + public void IEnumerable_Property_Should_Be_Logged_As_Sequence_Value_WHEN_No_Custom_Rule_Configured() + { + var obj = new FluentDestructuringPolicyModel + { + IEnumerable = Enumerable.Range(0, 3).Select(e => new InnerEntityPropertyModel { Id = Guid.NewGuid(), Property = $"property{e}" }), + }; + + var evt = DelegateSink.Execute(obj); + var sv = (StructureValue)evt.Properties[DelegateSink.ParamName]; + var properties = sv.Properties.ToDictionary(e => e.Name, e => e.Value); + + properties[nameof(FluentDestructuringPolicyModel.IEnumerable)].Should().BeOfType(); + } + + [Fact] + public void IEnumerable_Should_Be_Logged_As_Sequence_Value_WHEN_No_Custom_Rule_Configured() + { + var obj = Enumerable.Range(0, 3).Select(e => new InnerEntityPropertyModel() { Id = Guid.NewGuid(), Property = $"property{e}" }); + + var evt = DelegateSink.Execute(obj); + var value = evt.Properties[DelegateSink.ParamName]; + + value.Should().BeOfType(); + } + + [Fact] + public void Dictionary_Property_Should_Be_Logged_As_Dictionary_Value_WHEN_No_Custom_Rule_Configured() + { + var obj = new FluentDestructuringPolicyModel() + { + Dictionary = new Dictionary + { + { Guid.NewGuid(), new InnerEntityPropertyModel { Id = Guid.NewGuid(), Property = "property1" } }, + { Guid.NewGuid(), new InnerEntityPropertyModel { Id = Guid.NewGuid(), Property = "property2" } } + }, + }; + + var evt = DelegateSink.Execute(obj); + var sv = (StructureValue)evt.Properties[DelegateSink.ParamName]; + var properties = sv.Properties.ToDictionary(e => e.Name, e => e.Value); + + properties[nameof(FluentDestructuringPolicyModel.Dictionary)].Should().BeOfType(); + } + + [Fact] + public void Dictionary_Should_Be_Logged_As_Dictionary_Value_WHEN_No_Custom_Rule_Configured() + { + var obj = new Dictionary + { + { Guid.NewGuid(), new InnerEntityPropertyModel { Id = Guid.NewGuid(), Property = "property1" } }, + { Guid.NewGuid(), new InnerEntityPropertyModel { Id = Guid.NewGuid(), Property = "property2" } } + }; + + var evt = DelegateSink.Execute(obj); + var value = evt.Properties[DelegateSink.ParamName]; + + value.Should().BeOfType(); + } + + [Fact] + public void IEnumerable_Property_Should_Be_Logged_As_Configured_WHEN_That_Provided() + { + var obj = new FluentDestructuringPolicyModel + { + IEnumerableAsScalar = Enumerable.Range(0, 3).Select(e => new InnerEntityPropertyModel { Id = Guid.NewGuid(), Property = $"property{e}" }), + }; + + var evt = DelegateSink.Execute(obj); + var sv = (StructureValue)evt.Properties[DelegateSink.ParamName]; + var properties = sv.Properties.ToDictionary(e => e.Name, e => e.Value); + + properties[nameof(FluentDestructuringPolicyModel.IEnumerableAsScalar)].Should().BeOfType(); + } + + #endregion } \ No newline at end of file diff --git a/tests/Serilog.FluentDestructuring.UnitTests/Infrastructure/TestFluentDestructuringPolicy.cs b/tests/Serilog.FluentDestructuring.UnitTests/Infrastructure/TestFluentDestructuringPolicy.cs index f67ceb2..901f61e 100644 --- a/tests/Serilog.FluentDestructuring.UnitTests/Infrastructure/TestFluentDestructuringPolicy.cs +++ b/tests/Serilog.FluentDestructuring.UnitTests/Infrastructure/TestFluentDestructuringPolicy.cs @@ -91,6 +91,9 @@ protected override void Configure(FluentDestructuringBuilder builder) { e.Property(o => o.StringProperty) .Mask(); + + e.Property(o => o.IEnumerableAsScalar) + .AsScalar(); }); } } \ No newline at end of file diff --git a/tests/Serilog.FluentDestructuring.UnitTests/Models/FluentDestructuringPolicyModel.cs b/tests/Serilog.FluentDestructuring.UnitTests/Models/FluentDestructuringPolicyModel.cs index fa0ff82..2efbdf4 100644 --- a/tests/Serilog.FluentDestructuring.UnitTests/Models/FluentDestructuringPolicyModel.cs +++ b/tests/Serilog.FluentDestructuring.UnitTests/Models/FluentDestructuringPolicyModel.cs @@ -1,4 +1,6 @@ -namespace Serilog.FluentDestructuring.UnitTests.Models; +using System.Collections; + +namespace Serilog.FluentDestructuring.UnitTests.Models; internal class FluentDestructuringPolicyModel { @@ -7,4 +9,10 @@ internal class FluentDestructuringPolicyModel public int? NullProperty2 { get; init; } public string? StringProperty { get; init; } + + public IEnumerable IEnumerable { get; init; } = []; + + public Dictionary Dictionary { get; init; } = []; + + public IEnumerable IEnumerableAsScalar { get; init; } = Array.Empty(); } \ No newline at end of file From b6775d640b958143b8f6cee6032ac74bb2b9233c Mon Sep 17 00:00:00 2001 From: Vazovsk1y Date: Sun, 12 Jan 2025 16:37:56 +0300 Subject: [PATCH 5/7] -fixed IEnumerable logging bug. --- .../FluentDestructuringPolicy.cs | 135 +++++++++--------- 1 file changed, 65 insertions(+), 70 deletions(-) diff --git a/src/Serilog.FluentDestructuring/FluentDestructuringPolicy.cs b/src/Serilog.FluentDestructuring/FluentDestructuringPolicy.cs index 2506dcd..d449140 100644 --- a/src/Serilog.FluentDestructuring/FluentDestructuringPolicy.cs +++ b/src/Serilog.FluentDestructuring/FluentDestructuringPolicy.cs @@ -1,3 +1,4 @@ +using System.Collections; using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using System.Reflection; @@ -15,7 +16,7 @@ namespace Serilog.FluentDestructuring; /// public abstract class FluentDestructuringPolicy : IDestructuringPolicy { - private readonly IReadOnlyDictionary _configurations; + private readonly IReadOnlyDictionary _typeToConfiguration; private readonly FluentDestructuringPolicyOptions _options; protected FluentDestructuringPolicy() @@ -23,53 +24,51 @@ protected FluentDestructuringPolicy() _options = new FluentDestructuringPolicyOptions(); var builder = new FluentDestructuringBuilder(); ConfigureCore(builder); - _configurations = builder.Build(); + _typeToConfiguration = builder.Build(); } public bool TryDestructure(object entity, ILogEventPropertyValueFactory propertyValueFactory, [NotNullWhen(true)] out LogEventPropertyValue? result) { ArgumentNullException.ThrowIfNull(entity); - - var entityType = entity.GetType(); - if (!_configurations.TryGetValue(entityType, out var entityConfiguration)) + + if (entity is IEnumerable) { - result = CreateLogEventValueDefault(entity, entityType, propertyValueFactory); - return true; + result = null; + return false; } - - result = CreateLogEventPropertyValue(entity, entityConfiguration, propertyValueFactory); + + var entityType = entity.GetType(); + result = !_typeToConfiguration.TryGetValue(entityType, out var entityConfiguration) ? + CreateDefaultStructureValue(entity, entityType, propertyValueFactory) + : + CreateLogEventPropertyValue(entity, entityType, entityConfiguration, propertyValueFactory); + return true; } - private StructureValue CreateLogEventValueDefault( + private StructureValue CreateDefaultStructureValue( object entity, Type entityType, - ILogEventPropertyValueFactory propertyValueFactory) + ILogEventPropertyValueFactory factory) { - var logEventProperties = new List(); - - foreach (var propertyInfo in GetPropertiesRecursive(entityType)) - { - var propertyValue = GetPropertyValue(propertyInfo, entity); - if (propertyValue is null && _options.IgnoreNullProperties) - { - continue; - } - - logEventProperties.Add(new LogEventProperty(propertyInfo.Name, propertyValueFactory.CreatePropertyValue(propertyValue, true))); - } + // NOTE: `StructureValue` ctor call on passed `IEnumerable` parameter `ToArray` method, so I don't have to materialize twice calling `ToArray` or `ToList` here. + var logEventProperties = from propertyInfo in GetPropertiesRecursive(entityType) + let propertyValue = GetPropertyValue(propertyInfo, entity) + where propertyValue is not null || !_options.IgnoreNullProperties + select new LogEventProperty(propertyInfo.Name, factory.CreatePropertyValue(propertyValue, true)); return new StructureValue(logEventProperties, _options.ExcludeTypeTag ? null : entityType.Name); } private LogEventPropertyValue CreateLogEventPropertyValue( object? entity, - EntityDestructuringConfiguration entityConfiguration, - ILogEventPropertyValueFactory propertyValueFactory) + Type entityType, + EntityDestructuringConfiguration configuration, + ILogEventPropertyValueFactory factory) { - if (entityConfiguration.EntityDestructor is not null) + if (configuration.EntityDestructor is not null) { - return entityConfiguration.EntityDestructor.CreateLogEventPropertyValue(entity, propertyValueFactory); + return configuration.EntityDestructor.CreateLogEventPropertyValue(entity, factory); } if (entity is null) @@ -77,26 +76,26 @@ private LogEventPropertyValue CreateLogEventPropertyValue( return ScalarValue.Null; } - var entityType = entity.GetType(); var logEventProperties = new List(); - foreach (var propertyInfo in GetPropertiesRecursive(entityType)) { var propertyValue = GetPropertyValue(propertyInfo, entity); + + // NOTE: Global `IgnoreNullProperties` value will ignore custom conditional for destructuring rule applying. if (propertyValue is null && _options.IgnoreNullProperties) { continue; } - if (entityConfiguration.PropertyDestructuringConfigurations.TryGetValue(propertyInfo, out var propertyConfig)) + if (configuration.PropertyDestructuringConfigurations.TryGetValue(propertyInfo, out var propertyConfig)) { var logEventProperty = propertyConfig switch { - SimplePropertyDestructuringConfiguration simplePropertyConfig => HandleSimpleProperty(entity, propertyValue, propertyInfo, simplePropertyConfig, propertyValueFactory), + SimplePropertyDestructuringConfiguration simplePropertyConfig => HandleSimpleProperty(entity, propertyValue, propertyInfo, simplePropertyConfig, factory), InnerEntityDestructuringConfiguration innerEntityConfig => innerEntityConfig.ApplyDestructuringPredicate is not null && !innerEntityConfig.ApplyDestructuringPredicate.Invoke(entity) ? - new LogEventProperty(propertyInfo.Name, propertyValueFactory.CreatePropertyValue(propertyValue, true)) + new LogEventProperty(propertyInfo.Name, factory.CreatePropertyValue(propertyValue, true)) : - new LogEventProperty(innerEntityConfig.PropertyAlias, CreateLogEventPropertyValue(propertyValue, innerEntityConfig.EntityConfiguration, propertyValueFactory)), + new LogEventProperty(innerEntityConfig.PropertyAlias, CreateLogEventPropertyValue(propertyValue, propertyInfo.PropertyType, innerEntityConfig.EntityConfiguration, factory)), _ => throw new KeyNotFoundException(), }; @@ -107,53 +106,26 @@ private LogEventPropertyValue CreateLogEventPropertyValue( } else { - logEventProperties.Add(new LogEventProperty(propertyInfo.Name, propertyValueFactory.CreatePropertyValue(propertyValue, true))); + logEventProperties.Add(new LogEventProperty(propertyInfo.Name, factory.CreatePropertyValue(propertyValue, true))); } } return new StructureValue(logEventProperties, _options.ExcludeTypeTag ? null : entityType.Name); } - private static object? GetPropertyValue(PropertyInfo propertyInfo, object instance) - { - object? propertyValue; - try - { - propertyValue = Compile(propertyInfo).Invoke(instance); - } - catch (Exception ex) - { - SelfLog.WriteLine("The property accessor {0} threw exception {1}.", propertyInfo, ex); - propertyValue = $"The property accessor threw an exception: '{ex.GetType().Name}'."; - } - - return propertyValue; - - static Func Compile(PropertyInfo property) - { - var instanceParamExpr = Expression.Parameter(typeof(object), "instance"); - ArgumentNullException.ThrowIfNull(property.DeclaringType); - - var instanceExpr = Expression.Convert(instanceParamExpr, property.DeclaringType); - var propertyExpr = Expression.Property(instanceExpr, property); - var convertedPropExpr = Expression.Convert(propertyExpr, typeof(object)); - return Expression.Lambda>(convertedPropExpr, instanceParamExpr).Compile(); - } - } - private static LogEventProperty? HandleSimpleProperty( object instance, object? propertyValue, PropertyInfo propertyInfo, - SimplePropertyDestructuringConfiguration propertyConfig, - ILogEventPropertyValueFactory propertyValueFactory) + SimplePropertyDestructuringConfiguration propertyConfig, + ILogEventPropertyValueFactory factory) { if (propertyConfig.ApplyDestructuringPredicate is not null && !propertyConfig.ApplyDestructuringPredicate.Invoke(instance)) { - return new LogEventProperty(propertyInfo.Name, propertyValueFactory.CreatePropertyValue(propertyValue, true)); + return new LogEventProperty(propertyInfo.Name, factory.CreatePropertyValue(propertyValue, true)); } - var result = propertyConfig.PropertyDestructor.CreateLogEventProperty(propertyConfig.PropertyAlias, propertyValue, propertyValueFactory); + var result = propertyConfig.PropertyDestructor.CreateLogEventProperty(propertyConfig.PropertyAlias, propertyValue, factory); if (result is not null) { return result; @@ -161,7 +133,7 @@ private LogEventPropertyValue CreateLogEventPropertyValue( if (propertyConfig.PropertyDestructor is not IgnorePropertyDestructor) { - result = new LogEventProperty(propertyConfig.PropertyAlias, propertyValueFactory.CreatePropertyValue(propertyValue, true)); + result = new LogEventProperty(propertyConfig.PropertyAlias, factory.CreatePropertyValue(propertyValue, true)); } return result; @@ -190,13 +162,36 @@ private static IEnumerable GetPropertiesRecursive(Type type) type = type.BaseType; } } - - internal void ConfigureOptions(Action configureOptions) + + private static object? GetPropertyValue(PropertyInfo propertyInfo, object instance) { - ArgumentNullException.ThrowIfNull(configureOptions); - configureOptions.Invoke(_options); + object? propertyValue; + try + { + propertyValue = Compile(propertyInfo).Invoke(instance); + } + catch (Exception ex) + { + SelfLog.WriteLine("The property accessor {0} threw exception {1}.", propertyInfo, ex); + propertyValue = $"The property accessor threw an exception: '{ex.GetType().Name}'."; + } + + return propertyValue; + + static Func Compile(PropertyInfo property) + { + var instanceParamExpr = Expression.Parameter(typeof(object), "instance"); + ArgumentNullException.ThrowIfNull(property.DeclaringType); + + var instanceExpr = Expression.Convert(instanceParamExpr, property.DeclaringType); + var propertyExpr = Expression.Property(instanceExpr, property); + var convertedPropExpr = Expression.Convert(propertyExpr, typeof(object)); + return Expression.Lambda>(convertedPropExpr, instanceParamExpr).Compile(); + } } + internal void ConfigureOptions(Action configureOptions) => configureOptions.Invoke(_options); + private void ConfigureCore(FluentDestructuringBuilder builder) => Configure(builder); /// From 06901571215cfd18c2fc970db3d9f260e0a266f0 Mon Sep 17 00:00:00 2001 From: Vazovsk1y Date: Wed, 15 Jan 2025 19:25:04 +0300 Subject: [PATCH 6/7] -modified project version. --- .../Serilog.FluentDestructuring.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj b/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj index da7ca04..71df2fc 100644 --- a/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj +++ b/src/Serilog.FluentDestructuring/Serilog.FluentDestructuring.csproj @@ -18,7 +18,7 @@ snupkg true $(NoWarn);1591 - 1.0.0 + 1.0.1 From 63e284803aea62efca7e9ad69d158fe7f699872c Mon Sep 17 00:00:00 2001 From: Vazovsk1y Date: Wed, 15 Jan 2025 19:25:25 +0300 Subject: [PATCH 7/7] -added CHANGELOG.md. --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c78501b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +## 1.0.1 +- Moved to tag pushing based deploying strategy. +- Fixed [IEnumerable logging issue](https://github.com/Vazovsk1y/Serilog.FluentDestructuring/issues/2). + +## 1.0.0 +- Initial release. \ No newline at end of file