9using System.Collections;
10using System.Collections.Generic;
13using System.Threading.Tasks;
32 _applicationContext = applicationContext;
51 if (checkableObject is
null)
return;
53 RevalidateObject(checkableObject);
72 private void RevalidateObject(
object parameter)
74 if (parameter is IEnumerable list)
77 foreach (
object item
in list)
79 RevalidateObject(item);
87 var task = checkableObject.CheckRulesAsync();
89 while (!task.IsCompleted)
94 if (parameter is IUseFieldManager fieldHolder)
96 var properties = fieldHolder.FieldManager.GetRegisteredProperties();
97 foreach (var property
in properties.Where(r=>r.IsChild && fieldHolder.FieldManager.FieldExists(r)))
99 RevalidateObject(fieldHolder.FieldManager.GetFieldData(property).Value);
102 else if (parameter is IManageProperties propertyHolder)
104 foreach (
object child
in propertyHolder.GetChildren())
106 RevalidateObject(child);
Provides consistent context information between the client and server DataPortal objects.
ExecutionLocations
Enum representing the locations code can execute.
LogicalExecutionLocations
Enum representing the logical execution location The setting is set to server when server is execting...
A strongly-typed resource class, for looking up localized strings, etc.
static string NoSaveInvalidException
Looks up a localized string similar to Object is not valid and can not be saved.
Arguments parameter passed to the interceptor methods.
object Parameter
Gets or sets the criteria or business object paramter provided to the data portal from the client.
DataPortal interceptor to perform revalidation on business objects
void Initialize(InterceptArgs e)
Interception handler run before a DataPortal operation
RevalidatingInterceptor(ApplicationContext applicationContext)
Public constructor, intended to be executed by DI
void Complete(InterceptArgs e)
Interception handler run after a DataPortal operation
Defines the common methods for any business object which exposes means to supress and check business ...
Defines the common properties required objects that track their own status.
bool IsValid
Returns true if the object and its child objects are currently valid, false if the object or any of i...
Implement this interface to create a data portal interceptor that is notified each time the data port...