-
-
Notifications
You must be signed in to change notification settings - Fork 725
/
ConventionContext.cs
41 lines (34 loc) · 1.08 KB
/
ConventionContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
#nullable enable
namespace HotChocolate.Types.Descriptors
{
internal sealed class ConventionContext : IConventionContext
{
public ConventionContext(
string? scope,
IServiceProvider services,
IDescriptorContext descriptorContext)
{
Scope = scope;
Services = services;
DescriptorContext = descriptorContext;
}
/// <inheritdoc />
public string? Scope { get; }
/// <inheritdoc />
public IServiceProvider Services { get; }
/// <inheritdoc />
public IDictionary<string, object?> ContextData => DescriptorContext.ContextData;
/// <inheritdoc />
public IDescriptorContext DescriptorContext { get; }
public static ConventionContext Create(
string? scope,
IServiceProvider services,
IDescriptorContext descriptorContext) =>
new ConventionContext(
scope,
services,
descriptorContext);
}
}