protected virtual void GetObjectData(SerializationInfo info, StreamingContext context) { if (null == info) { throw new ArgumentNullException(nameof(info)); } if (_identities.Count > 0) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_Serialization); // BinaryFormatter and WindowsIdentity would be needed } } }