Back to Devexpress

BindToTypePolicy Class

corelibraries-devexpress-dot-utils.md

latest2.1 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public static class BindToTypePolicy
vb
Public Module BindToTypePolicy

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.

Inheritance

Object BindToTypePolicy

See Also

BindToTypePolicy Members

DevExpress.Utils Namespace