protected XElement GetSamlEndpoint(SerializableSamlEndpoint endpoint) { var cont = string.Format(@"<md:{0} xmlns:md=""urn:oasis:names:tc:SAML:2.0:metadata"" Binding=""{1}"" Location=""{2}"" ResponseLocation=""{3}"" index=""{4}"" isDefault=""{5}""/>", ParseProtocol(endpoint.Protocol), endpoint.BindingUri, endpoint.Location, endpoint.ResponseLocation, endpoint.Index, endpoint.IsDefault.ToString().ToLowerInvariant()); return(XElement.Parse(cont)); }
public static SerializableSamlEndpoint FromSamlEndpoint(SamlEndpoint samlEndpoint) { var source = samlEndpoint; var target = new SerializableSamlEndpoint(); target.Binding = source.Binding; target.BindingUri = source.BindingUri; target.Index = source.Index; target.IsDefault = source.IsDefault; target.Location = source.Location; target.Protocol = source.Protocol; target.ResponseLocation = source.ResponseLocation; return(target); }