Skip to content

Commit 6509078

Browse files
committed
Add support for configuring NonClusteredIndexDirection
1 parent 8137f43 commit 6509078

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Serilog.Sinks.MSSqlServer/Configuration/Implementations/Microsoft.Extensions.Configuration/MicrosoftExtensionsColumnOptionsProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ private static void SetCommonColumnOptions(IConfigurationSection section, SqlCol
3434
SetProperty.IfNotNull<bool>(section["allowNull"], (val) => target.AllowNull = val);
3535
SetProperty.IfNotNull<int>(section["dataLength"], (val) => target.DataLength = val);
3636
SetProperty.IfNotNull<bool>(section["nonClusteredIndex"], (val) => target.NonClusteredIndex = val);
37+
SetProperty.IfNotNull<SqlIndexDirection>(section["nonClusteredIndexDirection"], (val) => target.NonClusteredIndexDirection = val);
3738
}
3839

3940
private static void AddRemoveStandardColumns(IConfigurationSection config, ColumnOptions columnOptions)

src/Serilog.Sinks.MSSqlServer/Configuration/Implementations/System.Configuration/SystemConfigurationColumnOptionsProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ private static void SetCommonColumnOptions(ColumnConfig source, SqlColumn target
2626
SetProperty.IfProvided<bool>(source, nameof(target.AllowNull), value => target.AllowNull = value);
2727
SetProperty.IfProvided<int>(source, nameof(target.DataLength), value => target.DataLength = value);
2828
SetProperty.IfProvided<bool>(source, nameof(target.NonClusteredIndex), value => target.NonClusteredIndex = value);
29+
SetProperty.IfProvided<SqlIndexDirection>(source, nameof(target.NonClusteredIndexDirection), value => target.NonClusteredIndexDirection = value);
2930
}
3031

3132
private static void ReadPropertiesColumnOptions(MSSqlServerConfigurationSection config, ColumnOptions columnOptions)

0 commit comments

Comments
 (0)