BindToTypePolicy Class
Allows you to inspect assemblies/types and cancel the load operation or type resolution based on a specific condition.
Namespace: DevExpress.Utils
Assembly: DevExpress.Data.v24.1.dll
NuGet Package: DevExpress.Data
Declaration
Remarks
DevExpress UI controls can load assemblies and data types dynamically by calling methods such as Assembly.Load
or Type.GetType()
. DevExpress controls generate a security warning if an untrusted type is detected during deserialization.
Call one of the following methods at application startup to apply a restrictive policy:
You can also handle QueryAssemblyLoad and QueryBindToType events to resolve unknown assembly and data type loads.
Note
Handle the QueryNonTrustedTypeValidation event to validate blacklisted and “unknown” types only. The BindToTypePolicy
does not fire this event to allowed/trusted types.
Read the following topic for more information and examples: Safe Deserialization.