[]
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.
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
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. |
Type | Description |
---|---|
T | The value associated with the specified key, or null |
Name | Description |
---|---|
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.
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
Type | Name | Description |
---|---|---|
IPdfDict | dict | The current dictionary. |
PdfName | key | The key identifying the value. |
T | defValue | The default value. |
Type | Description |
---|---|
T | The value associated with the specified key, or null |
Name | Description |
---|---|
T |