Cascade
Loading...
Searching...
No Matches
Buzzware.Cascade.FromPropertyAttribute Class Reference

Attribute to specify the source property and optional converter and arguments for property mapping, allowing customization of how a property gets populated. More...

Inheritance diagram for Buzzware.Cascade.FromPropertyAttribute:

Public Member Functions

 FromPropertyAttribute (string sourcePropertyName, Type converterClass, params object[] args)
 FromPropertyAttribute Constructor. Validates and sets the converter class, source property name, and arguments. Throws an exception if the converter class does not implement IPropertyConverter.

Properties

string SourcePropertyName [get]
 The name of the source property from which to copy or convert a value.
IPropertyConverterConverter [get]
 The converter used to transform the property value from the source to the target type. It may be null if no conversion is required.
object[] Arguments [get]
 Optional arguments that may influence the conversion process.

Detailed Description

Attribute to specify the source property and optional converter and arguments for property mapping, allowing customization of how a property gets populated.

Constructor & Destructor Documentation

◆ FromPropertyAttribute()

Buzzware.Cascade.FromPropertyAttribute.FromPropertyAttribute ( string sourcePropertyName,
Type converterClass,
params object[] args )
inline

FromPropertyAttribute Constructor. Validates and sets the converter class, source property name, and arguments. Throws an exception if the converter class does not implement IPropertyConverter.

Parameters
sourcePropertyNameName of the property to be used as the source for conversion.
converterClassType of the converter class that must implement IPropertyConverter.
argsAdditional arguments required by the converter.
Exceptions
ArgumentExceptionThrown when converterClass does not implement IPropertyConverter.

The documentation for this class was generated from the following file:
  • Buzzware.Cascade/attributes/FromPropertyAttribute.cs