Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DirectiveResolutionContext"/> class.
 /// </summary>
 /// <param name="parentContext">The parent context.</param>
 /// <param name="request">The request.</param>
 /// <param name="arguments">The arguments.</param>
 public DirectiveResolutionContext(
     IGraphMiddlewareContext parentContext,
     IGraphDirectiveRequest request,
     IExecutionArgumentCollection arguments)
     : base(parentContext, request, arguments)
 {
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseResolutionContext{TRequest}"/> class.
 /// </summary>
 /// <param name="parentContext">The parent context.</param>
 /// <param name="request">The request.</param>
 /// <param name="arguments">The arguments.</param>
 protected BaseResolutionContext(
     IGraphMiddlewareContext parentContext,
     TRequest request,
     IExecutionArgumentCollection arguments)
     : base(parentContext, request, arguments)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ResolutionContext" /> class.
 /// </summary>
 /// <param name="parentContext">The parent context from which this resolution context should
 /// extract is base data values.</param>
 /// <param name="request">The resolution request to carry with the context.</param>
 /// <param name="arguments">The arguments to be passed to the resolver when its executed.</param>
 protected ResolutionContext(
     IGraphMiddlewareContext parentContext,
     IDataRequest request,
     IExecutionArgumentCollection arguments)
     : base(parentContext)
 {
     this.Request   = Validation.ThrowIfNullOrReturn(request, nameof(request));
     this.Arguments = Validation.ThrowIfNullOrReturn(arguments, nameof(arguments));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseGraphMiddlewareContext"/> class.
 /// </summary>
 /// <param name="otherContext">The other context.</param>
 protected BaseGraphMiddlewareContext(IGraphMiddlewareContext otherContext)
     : this(
         otherContext.ServiceProvider,
         otherContext.User,
         otherContext.Metrics,
         otherContext.Logger,
         otherContext.Items)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphFieldExecutionContext" /> class.
 /// </summary>
 /// <param name="parentContext">The parent context.</param>
 /// <param name="fieldRequest">The field request being executed against on this pipeline context.</param>
 /// <param name="variableData">The variable data.</param>
 public GraphFieldExecutionContext(
     IGraphMiddlewareContext parentContext,
     IGraphFieldRequest fieldRequest,
     IResolvedVariableCollection variableData)
     : base(parentContext)
 {
     this.Request             = Validation.ThrowIfNullOrReturn(fieldRequest, nameof(fieldRequest));
     this.VariableData        = variableData;
     this.ResolvedSourceItems = new List <GraphDataItem>();
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphFieldAuthorizationContext" /> class.
 /// </summary>
 /// <param name="parentContext">The parent context which created this one.</param>
 /// <param name="authRequest">The authentication request.</param>
 public GraphFieldAuthorizationContext(IGraphMiddlewareContext parentContext, IGraphFieldAuthorizationRequest authRequest)
     : base(parentContext)
 {
     this.Request = Validation.ThrowIfNullOrReturn(authRequest, nameof(authRequest));
 }