System.Security.Claims.ClaimsIdentity.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;
            }

            _serializedNameType = _nameClaimType;
            _serializedRoleType = _roleClaimType;
            if (_instanceClaims != null && _instanceClaims.Count > 0)
            {
                throw new PlatformNotSupportedException(SR.PlatformNotSupported_Serialization); // BinaryFormatter would be needed
            }
        }