ObjectInputStream.RegisterValidation(IObjectInputValidation, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Register an object to be validated before the graph is returned.
[Android.Runtime.Register("registerValidation", "(Ljava/io/ObjectInputValidation;I)V", "GetRegisterValidation_Ljava_io_ObjectInputValidation_IHandler")]
public virtual void RegisterValidation (Java.IO.IObjectInputValidation? obj, int prio);
[<Android.Runtime.Register("registerValidation", "(Ljava/io/ObjectInputValidation;I)V", "GetRegisterValidation_Ljava_io_ObjectInputValidation_IHandler")>]
abstract member RegisterValidation : Java.IO.IObjectInputValidation * int -> unit
override this.RegisterValidation : Java.IO.IObjectInputValidation * int -> unit
Parameters
the object to receive the validation callback.
- prio
- Int32
controls the order of callbacks;zero is a good default. Use higher numbers to be called back earlier, lower numbers for later callbacks. Within a priority, callbacks are processed in no particular order.
- Attributes
Exceptions
if object
is null
.
if this stream is currently not reading objects. In that case, calling this method is not allowed.
Remarks
Register an object to be validated before the graph is returned. While similar to resolveObject these validations are called after the entire graph has been reconstituted. Typically, a readObject method will register the object with the stream so that when all of the objects are restored a final set of validations can be performed.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.