protected TResponse ParseParts(ResponseUri parts, UrlParsingType type, UrlParser <TResponse> parser) { var data = type == UrlParsingType.Query ? parts.Query : parts.Fragment; if (data.IsEmpty()) { return(null); } var response = new TResponse { UrlParsingType = type, Error = data.Get(Consts.Oidc.Response.Error), ErrorDescription = data.Get(Consts.Oidc.Response.ErrorDescription), ErrorUri = data.Get(Consts.Oidc.Response.ErrorUri), State = data.Get(Consts.Oidc.Response.State) }; parser?.Invoke(response, data); return(response); }