System.Security.Claims.ClaimsPrincipal.OnSerializingMethod C# (CSharp) Method

OnSerializingMethod() private method

private OnSerializingMethod ( StreamingContext context ) : void
context StreamingContext
return void
        private void OnSerializingMethod(StreamingContext context)
        {
            if (this is ISerializable)
            {
                return;
            }

            if (_identities.Count > 0)
            {
                throw new PlatformNotSupportedException(SR.PlatformNotSupported_Serialization); // BinaryFormatter and WindowsIdentity would be needed
            }
        }