예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphFieldPath" /> class.
 /// </summary>
 /// <param name="collection">The collection the route belongs to.</param>
 /// <param name="pathSegments">The individual path segments of the route.</param>
 public GraphFieldPath(GraphCollection collection, params string[] pathSegments)
     : this(GraphFieldPath.Join(collection, pathSegments))
 {
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphArgumentFieldPath" /> class.
 /// </summary>
 /// <param name="parentPath">The parent path.</param>
 /// <param name="argumentName">Name of the argument.</param>
 public GraphArgumentFieldPath(GraphFieldPath parentPath, string argumentName)
     : base(GraphFieldPath.Join(parentPath.Path, argumentName))
 {
 }
예제 #3
0
 /// <summary>
 /// Joins a parent and child route segments under the top level field type provided.
 /// </summary>
 /// <param name="fieldType">Type of the field to prepend a root key to the path.</param>
 /// <param name="routeSegments">The route segments to join.</param>
 /// <returns>System.String.</returns>
 public static string Join(GraphCollection fieldType, params string[] routeSegments)
 {
     return(GraphFieldPath.Join(fieldType.ToRouteRoot().AsEnumerable().Concat(routeSegments).ToArray()));
 }