PostSharpAPI ReferencePost­Sharp.​Patterns.​ContractsContract­Localized­Text­ProviderGet­Formatting­String­Arguments
Open sandboxFocus

ContractLocalizedTextProvider.GetFormattingStringArguments Method

GetFormattingStringArguments(Object, String, LocationKind, Object[])

Returns an array of arguments that can be passed to the System.String.Format(System.String,System.Object[]) method

Declaration
public static object[] GetFormattingStringArguments(object value, string locationName, LocationKind locationKind, object[] additionalArguments)
Parameters
Type Name Description
Object value

The incorrect value (passed, assigned or returned).

System.String locationName

The name of the declaration being validated (or null if a return value is being validated).

LocationKind locationKind

The kind of declaration being validated.

Object[] additionalArguments

Additional arguments appended to the array of arguments.

Returns
Type Description
Object[]

An array of arguments that can be passed to the System.String.Format(System.String,System.Object[]) method, where the formatting strings can have parameters as described in the remarks of the documentation of the ContractLocalizedTextProvider class.

Remarks