[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Core.Rdl.Persistence.Json.JsonObjectCoderBuilder-1.Prop

Prop Method

Prop<TProperty>(string, Expression<Func<TObject, TProperty>>, JsonCoder<TProperty>, Func<TProperty, bool>)

Adds a property to the JSON object coder with the specified name, getter, and coder.

Declaration
public JsonObjectCoderBuilder<TObject> Prop<TProperty>(string name, Expression<Func<TObject, TProperty>> getter, JsonCoder<TProperty> coder, Func<TProperty, bool> skipOnWrite = null)
Parameters
Type Name Description
string name

A string value indicating the name of the property in the JSON object.

Expression<Func<TObject, TProperty>> getter

An Expression object to get the property value from the object.

JsonCoder<TProperty> coder

A JsonCoder<T> used to encode and decode the property value.

Func<TProperty, bool> skipOnWrite

A function with condition to skip writing the property.

Returns
Type Description
JsonObjectCoderBuilder<TObject>

The current instance of JsonObjectCoderBuilder<TObject>.

Type Parameters
Name Description
TProperty

The type of the property.

Prop<TProperty>(Expression<Func<TObject, TProperty>>, JsonCoder<TProperty>, Func<TProperty, bool>)

Adds a property to the JSON object coder with the specified getter and coder. The property name is derived from the expression.

Declaration
public JsonObjectCoderBuilder<TObject> Prop<TProperty>(Expression<Func<TObject, TProperty>> getter, JsonCoder<TProperty> coder, Func<TProperty, bool> skipOnWrite = null)
Parameters
Type Name Description
Expression<Func<TObject, TProperty>> getter

An Expression object to get the property value from the object.

JsonCoder<TProperty> coder

A JsonCoder<T> used to encode and decode the property value.

Func<TProperty, bool> skipOnWrite

A function with condition to skip writing the property.

Returns
Type Description
JsonObjectCoderBuilder<TObject>

The current instance of JsonObjectCoderBuilder<TObject>.

Type Parameters
Name Description
TProperty

The type of the property.

Prop<TProperty>(string, JsonCoder<TProperty>, Func<TObject, TProperty>, Action<TObject, TProperty>, Func<TProperty, bool>)

Adds a property to the JSON object coder with the specified name, coder, getter function, and setter function.

Declaration
public JsonObjectCoderBuilder<TObject> Prop<TProperty>(string name, JsonCoder<TProperty> coder, Func<TObject, TProperty> getterFn, Action<TObject, TProperty> setterFn, Func<TProperty, bool> skipOnWrite = null)
Parameters
Type Name Description
string name

A string value indicating the name of the property in the JSON object.

JsonCoder<TProperty> coder

A JsonCoder<T> used to encode and decode the property value.

Func<TObject, TProperty> getterFn

A function to get the property value from the object.

Action<TObject, TProperty> setterFn

An action to set the property value in the object.

Func<TProperty, bool> skipOnWrite

A function with condition to skip writing the property.

Returns
Type Description
JsonObjectCoderBuilder<TObject>

The current instance of JsonObjectCoderBuilder<TObject>.

Type Parameters
Name Description
TProperty

The type of the property.