Beispiel #1
0
 /// <summary>
 /// Creates a field coordinate that is missing the type name which is later filled in.
 /// </summary>
 /// <param name="fieldName">The field name.</param>
 /// <param name="argumentName">The argument name.</param>
 /// <returns></returns>
 public static FieldCoordinate CreateWithoutType(
     NameString fieldName,
     NameString?argumentName = null) =>
Beispiel #2
0
 protected bool IsField(NameString typeName, NameString fieldName)
 {
     return(_fieldReference.TypeName.Equals(typeName) &&
            _fieldReference.FieldName.Equals(fieldName));
 }
Beispiel #3
0
            public override NameString GetTypeName(Type type, TypeKind kind)
            {
                NameString name = base.GetTypeName(type, kind);

                return(name.Value + "_Named");
            }
Beispiel #4
0
            public override NameString GetMemberName(MemberInfo member, MemberKind kind)
            {
                NameString name = base.GetMemberName(member, kind);

                return(name.Value + "_Named");
            }
 public ISchemaBuilder AddDirective(
     NameString name,
     params ArgumentNode[] arguments)
 {
     throw new NotImplementedException();
 }
Beispiel #6
0
            public override NameString GetArgumentName(ParameterInfo parameter)
            {
                NameString name = base.GetArgumentName(parameter);

                return(name.Value + "_Named");
            }
Beispiel #7
0
 public DynamicFooType(NameString typeName)
 {
     _typeName = typeName;
 }
Beispiel #8
0
 /// <summary>
 /// Gets a type by its name and kind.
 /// </summary>
 /// <typeparam name="T">The expected type kind.</typeparam>
 /// <param name="typeName">The name of the type.</param>
 /// <returns>The type.</returns>
 /// <exception cref="ArgumentException">
 /// The specified type does not exist or
 /// is not of the specified type kind.
 /// </exception>
 public T GetType <T>(NameString typeName)
     where T : INamedType
 {
     return(_types.GetType <T>(typeName.EnsureNotEmpty(nameof(typeName))));
 }
Beispiel #9
0
 /// <summary>
 /// Tries to get the .net type representation of a schema.
 /// </summary>
 /// <param name="typeName">The name of the type.</param>
 /// <param name="clrType">The resolved .net type.</param>
 /// <returns>
 /// <c>true</c>, if a .net type was found that was bound
 /// the the specified schema type, <c>false</c> otherwise.
 /// </returns>
 public bool TryGetClrType(NameString typeName, out Type clrType)
 {
     return(_types.TryGetClrType(
                typeName.EnsureNotEmpty(nameof(typeName)),
                out clrType));
 }
Beispiel #10
0
 public Path Append(NameString name)
 {
     return(new Path(this, name));
 }
Beispiel #11
0
 public static Path New(NameString name)
 {
     return(new Path(null, name));
 }