Skip to content

Commit 8a9539b

Browse files
committed
Force nonhierachical property: documentation
Documented new column option `ResolveHierarchicalPropertyName` in README.md. Issue #542
1 parent f0c1f8b commit 8a9539b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ Each Standard Column in the `ColumnOptions.Store` list and any custom columns yo
339339

340340
* `ColumnName`
341341
* `PropertyName`
342+
* `ResolveHierarchicalPropertyName`
342343
* `DataType`
343344
* `AllowNull`
344345
* `DataLength`
@@ -352,7 +353,11 @@ Any valid SQL column name can be used. Standard Columns have default names assig
352353

353354
The optional name of a Serilog property to use as the value for a custom column. If not provided, the property used is the one that has the same name as the specified ColumnName. It applies only to custom columns defined in `AdditionalColumns` and is ignored for standard columns.
354355

355-
PropertyName can contain a simple property name like `SomeProperty` but it can also be used to hierachically reference sub-properties with expressions like `SomeProperty.SomeSubProperty.SomeThirdLevelProperty`. This can be used to easily bind additional columns to specific sub-properties following the paradigm of structured logging. Please be aware that collections are not supported. This means expressions like `SomeProperty.SomeArray[2]` will not work.
356+
PropertyName can contain a simple property name like `SomeProperty` but it can also be used to hierarchically reference sub-properties with expressions like `SomeProperty.SomeSubProperty.SomeThirdLevelProperty`. This can be used to easily bind additional columns to specific sub-properties following the paradigm of structured logging. Please be aware that collections are not supported. This means expressions like `SomeProperty.SomeArray[2]` will not work. Hierarchical property resolution can be disabled using `ResolveHierarchicalPropertyName` in case you need property names containing dots which should not be treated as hierarchical.
357+
358+
### ResolveHierarchicalPropertyName
359+
360+
Controls whether hierarchical sub-property expressions in `PropertyName` are evaluated (see above). The default is `true`. If set to `false` any value is treated as a simple property name and no hierarchical sub-property binding is done.
356361

357362
### DataType
358363

@@ -385,7 +390,7 @@ Numeric types use the default precision and scale. For numeric types, you are re
385390

386391
### AllowNull
387392

388-
Determines whether or not the column can store SQL `NULL` values. The default is true. Some of the other features like `PrimaryKey` have related restrictions, and some of the Standard Columns impose restrictions (for example, the `Id` column never allows nulls).
393+
Determines whether the column can store SQL `NULL` values. The default is `true`. Some of the other features like `PrimaryKey` have related restrictions, and some of the Standard Columns impose restrictions (for example, the `Id` column never allows nulls).
389394

390395
### DataLength
391396

0 commit comments

Comments
 (0)