Home PathTemplate Class
PathTemplate Class
Cancel

PathTemplate Class

Namespace: Json.Schema.Api.OpenApi

Inheritance: PathTemplate 🡒 object

Implemented interfaces:

  • IEquatable<PathTemplate>
  • IEquatable<string>

Models a templated path URI.

Properties

NameTypeSummary
Segmentsstring[]Gets the segments of the path.

Methods

Equals(PathTemplate other)

Indicates whether the current object is equal to another object of the same type.

Declaration

1
public bool Equals(PathTemplate other)
ParameterTypeDescription
otherPathTemplateAn object to compare with this object.

Returns

if the current object is equal to the parameter; otherwise, .

Equals(string other)

Indicates whether the current object is equal to another object of the same type.

Declaration

1
public bool Equals(string other)
ParameterTypeDescription
otherstringAn object to compare with this object.

Returns

if the current object is equal to the parameter; otherwise, .

Equals(object obj)

Determines whether the specified object is equal to the current object.

Declaration

1
public override bool Equals(object obj)
ParameterTypeDescription
objobjectThe object to compare with the current object.

Returns

if the specified object is equal to the current object; otherwise, .

GetHashCode()

Serves as the default hash function.

Declaration

1
public override int GetHashCode()

Returns

A hash code for the current object.

Parse(string source)

Parses a new path template from a string.

Declaration

1
public static PathTemplate Parse(string source)
ParameterTypeDescription
sourcestringThe string source

Returns

A path template.

ToString()

Returns a string that represents the current object.

Declaration

1
public override string ToString()

Returns

A string that represents the current object.

TryParse(string source, out PathTemplate template)

Attempts to parse a new path template from a string.

Declaration

1
public static bool TryParse(string source, out PathTemplate template)
ParameterTypeDescription
sourcestringThe string source
templateout PathTemplateThe path template if the parse succeeded, otherwise null

Returns

True if the parse succeeded, otherwise false.

Contents