Table of Contents

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

documentObject DocumentObject
getValue Func<ParagraphFormat, Unit>

Returns

Unit

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

documentObject DocumentObject

The object to get the value for.

getValue Func<ParagraphFormat, T>

The function to get the value from ParagraphFormat.

isEmpty Func<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.

emptyValue T

The 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

documentObject DocumentObject
getValue Func<Font, Unit>

Returns

Unit

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

documentObject DocumentObject

The object to get the value for.

getValue Func<Font, T>

The function to get the value from Font.

isEmpty Func<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.

emptyValue T

The empty value to return if the value is not assigned or could not be determined.

Returns

T

Type Parameters

T