Sisk

Method

UrlBuilder.AddSegmentIf

Namespace
Sisk.Core.Helpers
Assembly
Sisk.Core.dll

AddSegmentIf(string, bool) #

Conditionally adds a segment to the URL path.

C#
public UrlBuilder AddSegmentIf(string segment, bool condition)

Parameters #

segment string

The segment to add.

condition bool

The condition under which the segment should be added.

Returns #

UrlBuilder

The current UrlBuilder instance, with the segment added if condition is true.

Type to search the documentation and the API reference.