protected virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (null == info)
{
throw new ArgumentNullException(nameof(info));
}
const string Version = "1.0";
info.AddValue(VersionKey, Version);
if (!string.IsNullOrEmpty(_authenticationType))
{
info.AddValue(AuthenticationTypeKey, _authenticationType);
}
info.AddValue(NameClaimTypeKey, _nameClaimType);
info.AddValue(RoleClaimTypeKey, _roleClaimType);
if (!string.IsNullOrEmpty(_label))
{
info.AddValue(LabelKey, _label);
}
// actor
if (_actor != null || _bootstrapContext != null || (_instanceClaims != null && _instanceClaims.Count > 0))
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Serialization); // BinaryFormatter needed
}
}