Methods
public static LazyStrings DescribeLazyBoth(this ITypeAssistant assistant, IPear pear, string prefix = null, string suffix = null)
Combine the primary and secondary descriptors into a single LazyStrings instance. This method handles formatting for null pears correctly.
Parameters:
| assistant (ITypeAssistant) | Assistant to invoke. |
| pear (IPear) | Value to operate on. |
| prefix (string = null) | Optional prefix for the primary string. |
| suffix (string = null) | Optional suffix for the primary string. |
Returns: Lazystring pair.
public static LazyString DescribeLazyPrimary(this ITypeAssistant assistant, IPear pear, string prefix = null, string suffix = null)
Wrap the primary descriptor into a single LazyString instance. This method handles formatting for null pears correctly.
Parameters:
| assistant (ITypeAssistant) | Assistant to invoke. |
| pear (IPear) | Value to operate on. |
| prefix (string = null) | Optional prefix for the descriptor string. |
| suffix (string = null) | Optional suffix for the descriptor string. |
Returns: Lazy string with deferred formatting.
Wrap the secondary descriptor into a single LazyString instance. This method handles formatting for null pears correctly.
Parameters:
| assistant (ITypeAssistant) | Assistant to invoke. |
| pear (IPear) | Value to operate on. |
Returns: Lazy string with deferred formatting.
Wrap the formatting into a single LazyString instance. This method handles formatting for null pears correctly.
Parameters:
| assistant (ITypeAssistant) | Assistant to invoke. |
| pear (IPear) | Value to operate on. |
Returns: Lazy string with deferred formatting.
Call either the Format, FormatPartial or DescribePrimary methods depending on which one is available.
Parameters:
| assistant (ITypeAssistant) | |
| pear (IPear) |
Returns: The result of one of the formatting methods, or string.Empty.