Skip to main content
Version: 4.1

IModifiedExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.1.0.0)

Adds fluent markup extension methods to the IModified interface.

public class IModifiedExtensions

Methods

Static member Modified<TModified>(target, value)

Sets the Modified property of the target to the specified value.

ParameterTypeDescription
TModifiedThe type of the target, which must implement IModified.
targetTModifiedThe target object whose Modified property is to be set.
valueBooleanThe value to set for the Modified property.

Returns: TModified. The target object with the modified property set.

This method allows for fluent syntax when setting the Modified property.


var modifiedObject = someObject.Modified(true);

Static member OnModifiedChanged<TModified>(target, action)

Subscribes an action to the ModifiedChanged event of the target.

ParameterTypeDescription
TModifiedThe type of the target, which must implement IModified.
targetTModifiedThe target object whose ModifiedChanged event is to be subscribed to.
actionAction<TModified>The action to invoke when the ModifiedChanged event is raised.

Returns: TModified. The target object with the event subscription added.

This method allows for fluent syntax when subscribing to the ModifiedChanged event.


someObject.OnModifiedChanged(obj => AlertBox.Show("Modified changed!"));