Пример #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)));
 }
Пример #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);
Пример #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);
Пример #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));
 }