/// <summary>
        /// Called when the <see cref="Path"/> needs to be parsed.
        /// </summary>
        protected virtual void OnParsePath()
        {
            var segments = InternalPathSegments;

            segments.Clear();

            if (!string.IsNullOrEmpty(_pathInternal))
            {
                foreach (var segment in UriPathSegment.FromStrings(UriPathSegment.GetPathSegments(_pathInternal)))
                {
                    if (segment != null)
                    {
                        segment.Formatter = this;
                        segments.Add(segment);
                    }
                }
            }
        }
 /// <summary>
 /// Sets the path for the <see cref="Uri"/>.
 /// </summary>
 /// <param name="segments">The path segments for the <see cref="Uri"/>.</param>
 public UriFormatter SetPath(params string[] segments)
 {
     return(SetPath(UriPathSegment.FromStrings(segments)));
 }
Beispiel #3
0
 /// <summary>
 /// Builds a local path from the specified segments.
 /// </summary>
 /// <param name="segments">Array of path segments.</param>
 public SDataUri BuildLocalPath(params string[] segments)
 {
     return(BuildLocalPath(UriPathSegment.FromStrings(segments)));
 }