/// <summary>Initializes a new instance of the <see cref="UserInteractiveAuthorizationHandler"/> class.</summary> /// <param name="accessCodeRetriever">An implementation of the <see cref="IAccessCodeHandler"/> interface.</param> /// <param name="configuration">An instance of the <see cref="IAuthorizationContextConfiguration"/>.</param> /// <param name="queryfyDotNet">The <see cref="IQueryfyDotNet"/>.</param> /// <param name="httpClient">The <see cref="HttpClient"/>.</param> public UserInteractiveAuthorizationHandler([NotNull] IAccessCodeHandler accessCodeRetriever, IAuthorizationContextConfiguration configuration, IQueryfyDotNet queryfyDotNet, HttpClient httpClient) : base(configuration, queryfyDotNet, httpClient) { if (accessCodeRetriever == null) { throw new ArgumentNullException(nameof(accessCodeRetriever)); } this.accessCodeRetriever = accessCodeRetriever; }
public static IFluentParser FluentParser([NotNull] this IQueryfyDotNet queryfyDotNet, [NotNull] String queryString) { if (queryfyDotNet == null) { throw new ArgumentNullException(nameof(queryfyDotNet)); } if (String.IsNullOrEmpty(queryString)) { throw new ArgumentNullException(nameof(queryString)); } return(new FluentParser.FluentParser(queryfyDotNet, queryString)); }
/// <summary> /// Constructs a new instance of the <see cref="Type"/> and fills it by using the query string. /// </summary> /// <param name="queryfyDotNet">The <see cref="IQueryfyDotNet"/>.</param> /// <typeparam name="T">The <see cref="Type"/> of the destination.</typeparam> /// <param name="query">The query string.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="queryfyDotNet"/>' and '<paramref name="query"/>' cannot be null. </exception> public static T Parse <T>([NotNull] this IQueryfyDotNet queryfyDotNet, [NotNull] String query) { if (queryfyDotNet == null) { throw new ArgumentNullException(nameof(queryfyDotNet)); } if (String.IsNullOrEmpty(query)) { throw new ArgumentNullException(nameof(query)); } return((T)queryfyDotNet.Parse(typeof(T), query)); }
/// <summary> /// Constructs a new instance of the <see cref="Type"/> and fills it with the supplied mappings in the <see cref="IParserContext"/>. /// </summary> /// <param name="queryfyDotNet">The <see cref="IQueryfyDotNet"/>.</param> /// <typeparam name="T">The <see cref="Type"/> of the destination.</typeparam> /// <param name="parserContext">The <see cref="IParserContext"/>.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="queryfyDotNet"/>' and '<paramref name="parserContext"/>' cannot be null. </exception> public static T Parse <T>([NotNull] this IQueryfyDotNet queryfyDotNet, [NotNull] IParserContext parserContext) { if (queryfyDotNet == null) { throw new ArgumentNullException(nameof(queryfyDotNet)); } if (parserContext == null) { throw new ArgumentNullException(nameof(parserContext)); } return((T)queryfyDotNet.Parse(typeof(T), parserContext)); }
/// <summary> /// Initializes a new instance of the <see cref="OAuth2EndpointBuilder"/> class. /// </summary> /// <param name="authorizationContextConfiguration">The <see cref="IAuthorizationContextConfiguration"/>.</param> /// <param name="queryfyDotNet">An instance of <see cref="IQueryfyDotNet"/>.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="authorizationContextConfiguration"/>' and '<paramref name="queryfyDotNet"/>' cannot be null. </exception> public OAuth2EndpointBuilder([NotNull] IAuthorizationContextConfiguration authorizationContextConfiguration, [NotNull] IQueryfyDotNet queryfyDotNet) { if (authorizationContextConfiguration == null) { throw new ArgumentNullException(nameof(authorizationContextConfiguration)); } if (queryfyDotNet == null) { throw new ArgumentNullException(nameof(queryfyDotNet)); } this.authorizationContextConfiguration = authorizationContextConfiguration; this.queryfyDotNet = queryfyDotNet; }
/// <summary> /// Initializes a new instance of the <see cref="FluentParser"/> class. /// </summary> /// <param name="queryfyDotNet">An implementation of the <see cref="IQueryfyDotNet"/> interface.</param> /// <param name="queryString">The query string.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="queryfyDotNet"/>' and '<paramref name="queryString"/>' cannot be null. </exception> public FluentParser([NotNull] IQueryfyDotNet queryfyDotNet, [NotNull] String queryString) { if (queryfyDotNet == null) { throw new ArgumentNullException(nameof(queryfyDotNet)); } if (String.IsNullOrEmpty(queryString)) { throw new ArgumentNullException(nameof(queryString)); } this.queryfyDotNet = queryfyDotNet; this.parserContext = this.queryfyDotNet.CreateParserContext(queryString); }
/// <summary> /// Initializes a new instance of the <see cref="AuthorizationHandler"/> class. /// </summary> /// <param name="authorizationContextConfiguration">The <see cref="IAuthorizationContextConfiguration"/>.</param> /// <param name="queryfyDotNet">The <see cref="IQueryfyDotNet"/>.</param> /// <param name="httpClient">The <see cref="HttpClient"/>.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="httpClient"/>', '<paramref name="authorizationContextConfiguration"/>' and '<paramref name="queryfyDotNet"/>' cannot be null. </exception> protected AuthorizationHandler([NotNull] IAuthorizationContextConfiguration authorizationContextConfiguration, [NotNull] IQueryfyDotNet queryfyDotNet, [NotNull] HttpClient httpClient) { if (authorizationContextConfiguration == null) { throw new ArgumentNullException(nameof(authorizationContextConfiguration)); } if (queryfyDotNet == null) { throw new ArgumentNullException(nameof(queryfyDotNet)); } if (httpClient == null) { throw new ArgumentNullException(nameof(httpClient)); } this.AuthorizationContextConfiguration = authorizationContextConfiguration; this.QueryfyDotNet = queryfyDotNet; this.HttpClient = httpClient; }