/// <summary> /// Append a span of dates in the form of <see cref="DateTime"/> objects to the array. /// </summary> /// <remarks> /// The value of <see cref="DateTime.Kind"/> on any of the inputs does not have any effect on the behaviour of /// this method. /// </remarks> /// <param name="span">Span of dates to add.</param> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder Append(ReadOnlySpan <DateTime> span) { InnerBuilder.Reserve(span.Length); foreach (var item in span) { InnerBuilder.Append(Convert(item)); } return(this as TBuilder); }
public IApplicationBuilder Use(Func <RequestDelegate, RequestDelegate> middleware) { var middlewareName = string.Empty; // UseMiddleware doesn't work with null params. if (Properties.TryGetValue(NextMiddlewareName, out var middlewareNameObj) && middlewareNameObj != null) { middlewareName = middlewareNameObj.ToString(); Properties.Remove(NextMiddlewareName); } return(InnerBuilder.UseMiddleware <AnalysisMiddleware>(middlewareName) .Use(middleware)); }
public IApplicationBuilder New() { return(new AnalysisBuilder(InnerBuilder.New())); }
public RequestDelegate Build() { // Add one maker at the end before the default 404 middleware (or any fancy Join middleware). return(InnerBuilder.UseMiddleware <AnalysisMiddleware>("EndOfPipeline") .Build()); }
public override string ToString() { return(InnerBuilder.ToString()); }
/// <summary> /// Append a date from a <see cref="DateTimeOffset"/> object to the array. /// </summary> /// <remarks> /// Note that to convert the supplied <paramref name="value"/> parameter to a date, it is first converted to /// UTC and the date then taken from the UTC date/time. Depending on the value of its /// <see cref="DateTimeOffset.Offset"/> property, this may not necessarily be the same as the date obtained by /// calling its <see cref="DateTimeOffset.Date"/> property. /// </remarks> /// <param name="value">Date to add.</param> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder Append(DateTimeOffset value) { InnerBuilder.Append(Convert(value)); return(this as TBuilder); }
/// <summary> /// Swap the values of the dates at the specified indices. /// </summary> /// <param name="i">First index.</param> /// <param name="j">Second index.</param> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder Swap(int i, int j) { InnerBuilder.Swap(i, j); return(this as TBuilder); }
/// <summary> /// Set the value of a date in the form of a <see cref="DateTimeOffset"/> object at the specified index. /// </summary> /// <remarks> /// Note that to convert the supplied <paramref name="value"/> parameter to a date, it is first converted to /// UTC and the date then taken from the UTC date/time. Depending on the value of its /// <see cref="DateTimeOffset.Offset"/> property, this may not necessarily be the same as the date obtained by /// calling its <see cref="DateTimeOffset.Date"/> property. /// </remarks> /// <param name="index">Index at which to set value.</param> /// <param name="value">Date to set.</param> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder Set(int index, DateTimeOffset value) { InnerBuilder.Set(index, Convert(value)); return(this as TBuilder); }
/// <summary> /// Append a collection of dates in the form of <see cref="DateTimeOffset"/> objects to the array. /// </summary> /// <remarks> /// Note that to convert the <see cref="DateTimeOffset"/> objects in the <paramref name="values"/> parameter to /// dates, they are first converted to UTC and the date then taken from the UTC date/times. Depending on the /// value of each <see cref="DateTimeOffset.Offset"/> property, this may not necessarily be the same as the /// date obtained by calling the <see cref="DateTimeOffset.Date"/> property. /// </remarks> /// <param name="values">Collection of dates to add.</param> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder AppendRange(IEnumerable <DateTimeOffset> values) { InnerBuilder.AppendRange(values.Select(Convert)); return(this as TBuilder); }
/// <summary> /// Append a null date to the array. /// </summary> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder AppendNull() { InnerBuilder.AppendNull(); return(this as TBuilder); }