protected virtual void WriteClaimTypes(XmlDictionaryWriter writer, string prefix, string name, string ns, ICollection <ClaimType> claimTypes) { if (!claimTypes.Any()) { return; } writer.WriteStartElement(prefix, name, ns); foreach (var claimType in claimTypes) { WsAuthorizationSerializer.WriteClaimType(writer, claimType); } writer.WriteEndElement(); }
protected virtual bool TryReadClaimTypes(XmlDictionaryReader reader, string name, string ns, out List <ClaimType> claimTypes) { if (!reader.IsStartElement(name, ns)) { return(Out.False(out claimTypes)); } var list = new List <ClaimType>(); reader.ForEachChild(r => { if (WsAuthorizationSerializer.TryReadClaimType(reader, out var claimType)) { list.Add(claimType); return(true); } return(false); }); claimTypes = list; return(true); }
public FederationMetadataSerializer(WsAuthorizationSerializer wsAuthorizationSerializer, WsAddressingSerializer wsAddressingSerializer, Saml2Serializer saml2Serializer, DSigSerializer dSigSerializer) : base(saml2Serializer, dSigSerializer) { WsAuthorizationSerializer = wsAuthorizationSerializer; WsAddressingSerializer = wsAddressingSerializer; }