PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / Logging­Properties­Expression­Model Structure / Logging­Properties­Expression­Model Methods / Logging­Properties­Expression­Model.​Get­String Method

LoggingPropertiesExpressionModel.GetString Method

Gets the value of a logging property as a string, or defaultValue if the property does not exist.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public string GetString(
	string property,
	string defaultValue = ""
)

Parameters

property
Type: System.String
Name of a logging property.
defaultValue (Optional)
Type: System.String
The default value to return if the property does not exist.

Return Value

Type: String
See Also