Properties.GetOrThrow Method
Overloads
Name | Description |
---|---|
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance. | |
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance. |
GetOrThrow<T>(String)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. |
Returns
T
The value of the property.
GetOrThrow<T>(String, T)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
cached | T | The key of the property. |
Returns
T
The value of the property.
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be taken from the field if it exists. Make sure to use Set<T>(String, T, T) to update the cached field.
GetOrThrow<T>(String, T?)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Returns
T
The value of the property.
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be taken from the field if it exists. Make sure to use Set<T>(String, T, T) to update the cached field.
GetOrThrow<T>(String, Func<Exception>)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
exceptionCreator | Function to create an exception to throw if the no property with the specified |
Returns
T
The value of the property.
GetOrThrow<T>(String, T, Func<Exception>)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
cached | T | The key of the property. |
exceptionCreator | Function to create an exception to throw if the no property with the specified |
Returns
T
The value of the property.
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be taken from the field if it exists. Make sure to use Set<T>(String, T, T) to update the cached field.
GetOrThrow<T>(String, T?, Func<Exception>)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
cached | The key of the property. | |
exceptionCreator | Function to create an exception to throw if the no property with the specified |
Returns
T
The value of the property.
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be taken from the field if it exists. Make sure to use Set<T>(String, T, T) to update the cached field.
GetOrThrow<T>(String, Func<String, Exception>)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
exceptionCreator | Function to create an exception to throw if the no property with the specified |
Returns
T
The value of the property.
GetOrThrow<T>(String, T, Func<String, Exception>)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
cached | T | The key of the property. |
exceptionCreator | Function to create an exception to throw if the no property with the specified |
Returns
T
The value of the property.
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be taken from the field if it exists. Make sure to use Set<T>(String, T, T) to update the cached field.
GetOrThrow<T>(String, T?, Func<String, Exception>)
Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
cached | The key of the property. | |
exceptionCreator | Function to create an exception to throw if the no property with the specified |
Returns
T
The value of the property.
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be taken from the field if it exists. Make sure to use Set<T>(String, T, T) to update the cached field.