/// <summary>Determines whether the specified <see cref="T:System.Type" /> can be deserialized with the <see cref="T:System.Runtime.Serialization.Formatters.TypeFilterLevel" /> property set to Low.</summary> /// <param name="t">The <see cref="T:System.Type" /> to check for the ability to deserialize. </param> /// <param name="securityLevel">The <see cref="T:System.Runtime.Serialization.Formatters.TypeFilterLevel" /> property value. </param> /// <exception cref="T:System.Security.SecurityException">The <paramref name="t" /> parameter is an advanced type and cannot be deserialized when the <see cref="T:System.Runtime.Serialization.Formatters.TypeFilterLevel" /> property is set to Low. </exception> public static void CheckTypeSecurity(Type t, TypeFilterLevel securityLevel) { if (securityLevel == TypeFilterLevel.Full) { return; } FormatterServices.CheckNotAssignable(typeof(DelegateSerializationHolder), t); FormatterServices.CheckNotAssignable(typeof(ISponsor), t); FormatterServices.CheckNotAssignable(typeof(IEnvoyInfo), t); FormatterServices.CheckNotAssignable(typeof(ObjRef), t); }