Exemplo n.º 1
0
 /// <summary>
 /// Applies the path to this builder, overwriting any existing path. This method automatically prefixes a forward slash to the resulting path.
 /// </summary>
 /// <param name="this">The builder.</param>
 /// <param name="segments">The path segments.</param>
 public static T WithPathSegments <T>(this IBuilderWithPath <T> @this, IEnumerable <string> segments)
 {
     if (segments == null)
     {
         throw new ArgumentNullException(nameof(segments));
     }
     return(@this.WithPrefixlessPathSegments(Enumerable.Repeat("", 1).Concat(segments)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Applies the path to this builder, overwriting any existing path. This method automatically prefixes a forward slash to the resulting path.
 /// </summary>
 /// <param name="this">The builder.</param>
 /// <param name="segments">The path segments.</param>
 public static T WithPathSegments <T>(this IBuilderWithPath <T> @this, params string[] segments) => @this.WithPathSegments((IEnumerable <string>)segments);
Exemplo n.º 3
0
 /// <summary>
 /// Applies the path to this builder, overwriting any existing path. This method does not automatically prefix a forward slash to the resulting path.
 /// </summary>
 /// <param name="this">The builder.</param>
 /// <param name="segments">The path segments.</param>
 public static T WithPrefixlessPathSegments <T>(this IBuilderWithPath <T> @this, params string[] segments) =>
 @this.WithPrefixlessPathSegments(segments);
Exemplo n.º 4
0
 /// <summary>
 /// Applies the path to this builder, overwriting any existing path. This method does not automatically prefix a forward slash to the resulting path.
 /// </summary>
 /// <param name="this">The builder.</param>
 /// <param name="segments">The path segments.</param>
 public static T WithPrefixlessPathSegments <T>(this IBuilderWithPath <T> @this, params string[] segments)
 {
     _ = @this ?? throw new ArgumentNullException(nameof(@this));
     return(@this.WithPrefixlessPathSegments(segments));
 }