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­Int64 Method

LoggingPropertiesExpressionModel.GetInt64 Method

Gets the value of a logging property as an Int64, or defaultValue if the property does not exist. Throws an exception if the property exists but can't be converted to Int64 using ToInt64(Object).

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 long GetInt64(
	string property,
	long defaultValue = 0
)

Parameters

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

Return Value

Type: Int64
See Also