Class ValidationContext
Context for a server method which is used on before add or update of an item.
Inheritance
Inherited Members
Namespace: Innovator.Server
Assembly: Innovator.Client.dll
Syntax
public class ValidationContext : IValidationContext, IContext
Constructors
| Improve this Doc View SourceValidationContext(IServerConnection, IItem)
Initializes a new instance of the ValidationContext class.
Declaration
public ValidationContext(IServerConnection conn, IItem changes)
Parameters
Type | Name | Description |
---|---|---|
IServerConnection | conn | The connection. |
IItem | changes | The changes. |
Properties
| Improve this Doc View SourceConn
Connection to the database
Declaration
public IServerConnection Conn { get; }
Property Value
Type | Description |
---|---|
IServerConnection |
Implements
| Improve this Doc View SourceErrorBuilder
Error builder which captures any errors which are encountered
Declaration
public IErrorBuilder ErrorBuilder { get; }
Property Value
Type | Description |
---|---|
IErrorBuilder |
Implements
| Improve this Doc View SourceException
Get the exception object created for any errors that have happened so far.
Declaration
public Exception Exception { get; }
Property Value
Type | Description |
---|---|
System.Exception |
Implements
| Improve this Doc View SourceExisting
Get the existing item in the database
Declaration
public IReadOnlyItem Existing { get; }
Property Value
Type | Description |
---|---|
IReadOnlyItem |
Implements
| Improve this Doc View SourceIsNew
Indicates if the argument is new (not in the database)
Declaration
public bool IsNew { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceItem
The changes given to the database. This object should be modified to make any additional changes
Declaration
public IItem Item { get; }
Property Value
Type | Description |
---|---|
IItem |
Implements
| Improve this Doc View SourceMerged
Gets an item which represents the new item after the changes are applied
Declaration
public IReadOnlyItem Merged { get; }
Property Value
Type | Description |
---|---|
IReadOnlyItem |
Implements
| Improve this Doc View SourceQueryDefaults
Method for modifying the query to get existing items
Declaration
public Action<IItem> QueryDefaults { get; set; }
Property Value
Type | Description |
---|---|
System.Action<IItem> |
Implements
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
public bool IsBeingSetNull(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the property to check |
Returns
Type | Description |
---|---|
System.Boolean |
|
Implements
| Improve this Doc View SourceIsChanging(String[])
Indicates if one or more properties in the list are changing
Declaration
public bool IsChanging(params string[] names)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | names | Property name(s) |
Returns
Type | Description |
---|---|
System.Boolean |
|
Implements
| Improve this Doc View SourceNewOrExisting(String)
Gets a property from the Item item (if it exists). Otherwise, the property from Existing is returned
Declaration
public 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 |