예제 #1
0
 /// <summary>
 /// Registers type mapping from CLR type to <see cref="AutoRegisteringObjectGraphType{T}"/> and/or <see cref="AutoRegisteringInputObjectGraphType{T}"/>.
 /// <br/>
 /// These mappings are used for type inference when constructing fields using expressions:
 /// <br/>
 /// <c>
 /// Field(x => x.Filters);
 /// </c>
 /// </summary>
 /// <param name="schema">The schema for which the mapping is registered.</param>
 /// <typeparam name="TClrType">The CLR property type from which to infer the GraphType.</typeparam>
 /// <param name="mode">Which registering mode to use - input only, output only or both.</param>
 public static void AutoRegister <TClrType>(this ISchema schema, AutoRegisteringMode mode = AutoRegisteringMode.Both)
 {
     schema.AutoRegister(typeof(TClrType), mode);
 }