Interface IValidationContext
Context for a server method which is used on before add or update of an item.
Inherited Members
Namespace: Innovator.Server
Assembly: Innovator.Client.dll
Syntax
public interface IValidationContext : IContext
Properties
| Improve this Doc View SourceErrorBuilder
Error builder which captures any errors which are encountered
Declaration
IErrorBuilder ErrorBuilder { get; }
Property Value
Type | Description |
---|---|
IErrorBuilder |
Exception
Get the exception object created for any errors that have happened so far.
Declaration
Exception Exception { get; }
Property Value
Type | Description |
---|---|
System.Exception |
Existing
Get the existing item in the database
Declaration
IReadOnlyItem Existing { get; }
Property Value
Type | Description |
---|---|
IReadOnlyItem |
IsNew
Indicates if the argument is new (not in the database)
Declaration
bool IsNew { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Item
The changes given to the database. This object should be modified to make any additional changes
Declaration
IItem Item { get; }
Property Value
Type | Description |
---|---|
IItem |
Merged
Gets an item which represents the new item after the changes are applied
Declaration
IReadOnlyItem Merged { get; }
Property Value
Type | Description |
---|---|
IReadOnlyItem |
QueryDefaults
Method for modifying the query to get existing items
Declaration
Action<IItem> QueryDefaults { get; set; }
Property Value
Type | Description |
---|---|
System.Action<IItem> |
Methods
| Improve this Doc View SourceIsBeingSetNull(String)
Indicates if a property is being set null. Note that this does not detect if the property already is null.
Declaration
bool IsBeingSetNull(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the property to check |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsChanging(String[])
Indicates if one or more properties in the list are changing
Declaration
bool IsChanging(params string[] names)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | names | Property name(s) |
Returns
Type | Description |
---|---|
System.Boolean |
|
NewOrExisting(String)
Gets a property from the Item item (if it exists). Otherwise, the property from Existing is returned
Declaration
IReadOnlyProperty NewOrExisting(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the property to retrieve |
Returns
Type | Description |
---|---|
IReadOnlyProperty | The IReadOnlyProperty from the incoming query (if defined). Otherwise, the IReadOnlyProperty from the database data |