TypeAssistantExtensionMethods

public static class TypeAssistantExtensionMethods
Extension methods for ITypeAssistant implementations.

Methods

DescribeLazyBoth

#Example
Combine the primary and secondary descriptors into a single LazyStrings instance. This method handles formatting for null pears correctly.
public static LazyStrings DescribeLazyBoth(
assistant,
Assistant to invoke.
pear,
Value to operate on.
prefix = null,
Optional prefix for the primary string.
suffix = null
Optional suffix for the primary string.
)
Lazystring pair.

DescribeLazyPrimary

#Example
Wrap the primary descriptor into a single LazyString instance. This method handles formatting for null pears correctly.
public static LazyString DescribeLazyPrimary(
assistant,
Assistant to invoke.
pear,
Value to operate on.
prefix = null,
Optional prefix for the descriptor string.
suffix = null
Optional suffix for the descriptor string.
)
Lazy string with deferred formatting.

DescribeLazySecondary

#Example
Wrap the secondary descriptor into a single LazyString instance. This method handles formatting for null pears correctly.
public static LazyString DescribeLazySecondary(
assistant,
Assistant to invoke.
pear
Value to operate on.
)
Lazy string with deferred formatting.

FormatLazy

#Example
Wrap the formatting into a single LazyString instance. This method handles formatting for null pears correctly.
public static LazyString FormatLazy(
assistant,
Assistant to invoke.
pear
Value to operate on.
)
Lazy string with deferred formatting.

ToStringWithFallback

#Example
Call either the Format, FormatPartial or DescribePrimary methods depending on which one is available.
public static string ToStringWithFallback(
assistant,
pear
)
The result of one of the formatting methods, or string.Empty.