示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyGraphFieldTemplate" /> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="propInfo">The property information.</param>
 /// <param name="kind">The kind of graph type that will own this field.</param>
 public PropertyGraphFieldTemplate(IGraphTypeTemplate parent, PropertyInfo propInfo, TypeKind kind)
     : base(parent, propInfo)
 {
     this.Property = Validation.ThrowIfNullOrReturn(propInfo, nameof(propInfo));
     this.Kind     = kind;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphTypeMethodTemplate" /> class.
 /// </summary>
 /// <param name="parent">The parent object template that owns this method.</param>
 /// <param name="methodInfo">The method information.</param>
 /// <param name="kind">The kind of object that will own this field.</param>
 public GraphTypeMethodTemplate(IGraphTypeTemplate parent, MethodInfo methodInfo, TypeKind kind)
     : base(parent, methodInfo)
 {
     this.Kind = kind;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphDirectiveMethodTemplate"/> class.
 /// </summary>
 /// <param name="parent">The owner of this method.</param>
 /// <param name="method">The method information.</param>
 public GraphDirectiveMethodTemplate(IGraphTypeTemplate parent, MethodInfo method)
 {
     this.Parent = Validation.ThrowIfNullOrReturn(parent, nameof(parent));
     this.Method = Validation.ThrowIfNullOrReturn(method, nameof(method));
     _arguments  = new List <GraphFieldArgumentTemplate>();
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphTypeFieldTemplate" /> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="attributeProvider">The instance that will supply the various attributes used to generate this field template.
 /// This is usually <see cref="PropertyInfo"/> or <see cref="MethodInfo"/>.</param>
 protected GraphTypeFieldTemplate(IGraphTypeTemplate parent, ICustomAttributeProvider attributeProvider)
     : base(attributeProvider)
 {
     this.Parent       = Validation.ThrowIfNullOrReturn(parent, nameof(parent));
     _securityPolicies = FieldSecurityGroup.Empty;
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MethodGraphFieldTemplate" /> class.
 /// </summary>
 /// <param name="parent">The parent object template that owns this method.</param>
 /// <param name="methodInfo">The method information.</param>
 protected MethodGraphFieldTemplate(IGraphTypeTemplate parent, MethodInfo methodInfo)
     : base(parent, methodInfo)
 {
     this.Method = Validation.ThrowIfNullOrReturn(methodInfo, nameof(methodInfo));
     _arguments  = new List <GraphFieldArgumentTemplate>();
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphTypeExtensionFieldTemplate"/> class.
 /// </summary>
 /// <param name="parent">The parent object template that owns this method.</param>
 /// <param name="methodInfo">The method information.</param>
 public GraphTypeExtensionFieldTemplate(IGraphTypeTemplate parent, MethodInfo methodInfo)
     : base(parent, methodInfo)
 {
 }