[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.IPdfDictExt.Get

Get Method

Get<T>(IPdfDict, PdfName, bool)

Gets the value associated with the specified key, if the value does not exist or cannot be converted to a T returns null. Note! This method returns IPdfRef if T is IPdfRef, otherwise the method resolves the reference and returns actual object.

Declaration
public static T Get<T>(this IPdfDict dict, PdfName key, bool addWarning = true) where T : IPdfObject
Public Shared Function [Get](Of T As IPdfObject)(dict As IPdfDict, key As PdfName, Optional addWarning As Boolean = True) As T
Parameters
Type Name Description
IPdfDict dict

The current dictionary.

PdfName key

The key identifying the value.

bool addWarning

Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if errors occur.

Returns
Type Description
T

The value associated with the specified key, or null

Type Parameters
Name Description
T

Get<T>(IPdfDict, PdfName, T)

Gets the value associated with the specified key, if the value does not exist or cannot be converted to a T returns the defValue. Note! This method returns IPdfRef if T is IPdfRef, otherwise the method resolves the reference and returns actual object.

Declaration
public static T Get<T>(this IPdfDict dict, PdfName key, T defValue) where T : IPdfObject
Public Shared Function [Get](Of T As IPdfObject)(dict As IPdfDict, key As PdfName, defValue As T) As T
Parameters
Type Name Description
IPdfDict dict

The current dictionary.

PdfName key

The key identifying the value.

T defValue

The default value.

Returns
Type Description
T

The value associated with the specified key, or null

Type Parameters
Name Description
T