DeserializationSettings.InvokeWithBinaryFormatterDenied(Action) Method
This member is for advanced configuration. It supports the internal infrastructure, and is not intended to be used directly from your code.
Namespace: DevExpress.Utils
Assembly: DevExpress.Data.v24.2.dll
Declaration
Parameters
Name | Type |
---|---|
restrictedAction | Action |
Remarks
Use the InvokeWithBinaryFormatterDenied
method to disable BinaryFormatter
deserialization for a certain part of your code:
DevExpress.Utils.DeserializationSettings.InvokeWithBinaryFormatterDenyed(()=>{
// BinaryFormatter is disabled.
});
Call the DenyBinaryFormatter() method at application startup to disable BinaryFormatter
deserialization in your application:
static void Main() {
DevExpress.Utils.DeserializationSettings.DenyBinaryFormatter();
Application.Run(new Form1());
}
Read the following topic for more information: Safe Deserialization.
See Also