Method GetUsedFormatValue
- Namespace
- MigraDoc.DocumentObjectModel.Visitors
- Assembly
- MigraDoc.DocumentObjectModel.dll
GetUsedFormatValue(DocumentObject, Func<ParagraphFormat, Unit>)
Gets a directly or via style assigned ParagraphFormat sub-value of type Unit.
public static Unit GetUsedFormatValue(this DocumentObject documentObject, Func<ParagraphFormat, Unit> getValue)
Parameters
documentObjectDocumentObjectgetValueFunc<ParagraphFormat, Unit>
Returns
GetUsedFormatValue<T>(DocumentObject, Func<ParagraphFormat, T>, Func<T, bool>, T)
Gets a directly or via style assigned ParagraphFormat sub-value.
public static T GetUsedFormatValue<T>(this DocumentObject documentObject, Func<ParagraphFormat, T> getValue, Func<T, bool> isEmpty, T emptyValue)
Parameters
documentObjectDocumentObjectThe object to get the value for.
getValueFunc<ParagraphFormat, T>The function to get the value from ParagraphFormat.
isEmptyFunc<T, bool>The function to determine if the value is not set. If the directly assigned value is not set, we try to get it via style.
emptyValueTThe empty value to return if the value is not assigned or could not be determined.
Returns
- T
Type Parameters
T
GetUsedFormatValue(DocumentObject, Func<Font, Unit>)
Gets a directly or via style assigned Font sub-value of type Unit.
public static Unit GetUsedFormatValue(this DocumentObject documentObject, Func<Font, Unit> getValue)
Parameters
documentObjectDocumentObjectgetValueFunc<Font, Unit>
Returns
GetUsedFormatValue<T>(DocumentObject, Func<Font, T>, Func<T, bool>, T)
Gets a directly or via style assigned Font sub-value.
public static T GetUsedFormatValue<T>(this DocumentObject documentObject, Func<Font, T> getValue, Func<T, bool> isEmpty, T emptyValue)
Parameters
documentObjectDocumentObjectThe object to get the value for.
getValueFunc<Font, T>The function to get the value from Font.
isEmptyFunc<T, bool>The function to determine if the value is not set. If the directly assigned value is not set, we try to get it via style.
emptyValueTThe empty value to return if the value is not assigned or could not be determined.
Returns
- T
Type Parameters
T