Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Latest commit

 

History

History
92 lines (61 loc) · 2.37 KB

File metadata and controls

92 lines (61 loc) · 2.37 KB

ToUpperAttribute ..

Used to mutate the specified string to a uppercase.

Namespace: Dado.ComponentModel.DataMutations
Implements: Dado.ComponentModel.DataMutations.MutationAttribute (in Dado.ComponentModel.Mutations)

Syntax

[AttributeUsage(AttributeTargets.Property)]
public class ToUpperAttribute : MutationAttribute

Properties

Name Description
CultureInfo Gets or sets the CultureInfo to be used when determining the appropriate case.
Priority Gets or sets a value indicating the priority that determines the order in which MutationAttributes are evaluated.
RequiresContext A flag indicating the attribute requires a non-null MutationContext<T> to perform validation.

Methods

Name Description
Mutate(Object, IMutationContext) Mutates the given value according to this MutationAttribute.
MutateValue(Object, IMutationContext) Implements the mutation logic for this ToUpperAttribute.

CultureInfo

Gets or sets the CultureInfo to be used when determining the appropriate case.

Syntax

public CultureInfo CultureInfo { get; set; }
Type
System.Globalization.CultureInfo

Priority

Gets or sets a value indicating the priority that determines the order in which MutationAttributes are evaluated. Defaults to 40.

Syntax

public override int Priority { get; set; } = 40;
Type
System.Int32

MutateValue(Object, IMutationContext)

Implements the mutation logic for this ToUpperAttribute.

Syntax

protected override object MutateValue(
	object value,
	IMutationContext context
)

Returns

The specified value converted to uppercase.

Parameters

value
Type: System.Object
The value to mutate.
context
Type: Dado.ComponentModel.DataMutations.IMutationContext
Describes the value being mutated and provides services and context for mutation.