Table of Contents

Method AddSegmentIf

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

AddSegmentIf(string, bool)

Conditionally adds a segment to the URL path.

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.