Attribute marking a property as the destination and type for conversion from a blob of a given path. The converter is also specified.
More...
|
| | FromBlobAttribute (string pathProperty, Type? converter=null) |
| | FromBlobAttribute Constructor. Validates converter and initializes properties.
|
| object? | ConvertToPropertyType (byte[] blob, Type destinationPropertyType) |
| | Converts the provided blob data into the specified destination property type. Uses the provided converter if available, otherwise returns the original blob data.
|
|
|
string | PathProperty [get] |
| | Name of a property holding the path to the blob.
|
|
IBlobConverter? | Converter [get] |
| | The converter to be used for converting the blob data.
|
Attribute marking a property as the destination and type for conversion from a blob of a given path. The converter is also specified.
https://buzzware.github.io/cascade/api_reference/md_api__docs_2using__cascade_2associations_2associations.html
◆ FromBlobAttribute()
| Buzzware.Cascade.FromBlobAttribute.FromBlobAttribute |
( |
string | pathProperty, |
|
|
Type? | converter = null ) |
|
inline |
FromBlobAttribute Constructor. Validates converter and initializes properties.
- Parameters
-
| pathProperty | The name of the property containing the path to the blob data. |
| converter | The type of the converter class that should implement IBlobConverter for converting blob data. |
◆ ConvertToPropertyType()
| object? Buzzware.Cascade.FromBlobAttribute.ConvertToPropertyType |
( |
byte[] | blob, |
|
|
Type | destinationPropertyType ) |
|
inline |
Converts the provided blob data into the specified destination property type. Uses the provided converter if available, otherwise returns the original blob data.
- Parameters
-
| blob | The byte array representing the data to be converted. |
| destinationPropertyType | The type to which the blob data should be converted. |
- Returns
- The converted object to the destination property type or the original blob data if no converter is available.
The documentation for this class was generated from the following file:
- Buzzware.Cascade/attributes/FromBlobAttribute.cs