private Model.Scope ValidateAppliesTo(EndpointAddress appliesTo)
{
if (appliesTo == null)
{
throw new ArgumentNullException("appliesTo");
}
var scope = this.multiProtocolConfiguration.RetrieveScope(appliesTo.Uri);
if (scope == null)
{
throw new InvalidRequestException(String.Format("The relying party '{0}' was not found.", appliesTo.Uri.OriginalString));
}
return scope;
}