195 references to UriFormat
aspire (1)
Aspire.Dashboard (3)
Aspire.Hosting.OpenAI (1)
Aspire.Seq (1)
dotnet-svcutil-lib (5)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.Http.Abstractions (4)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Http.Results (4)
Microsoft.AspNetCore.Mvc.Core (2)
Microsoft.Build.Tasks.Git (2)
Microsoft.NET.Build.Containers (2)
Microsoft.SourceLink.AzureDevOpsServer.Git (2)
Microsoft.SourceLink.AzureRepos.Git (2)
Microsoft.SourceLink.Bitbucket.Git (2)
Microsoft.SourceLink.Common (2)
Microsoft.SourceLink.Gitea (2)
Microsoft.SourceLink.Gitee (2)
Microsoft.SourceLink.GitHub (2)
Microsoft.SourceLink.GitLab (2)
Microsoft.SourceLink.GitWeb (2)
netstandard (1)
NuGet.Configuration (1)
NuGet.Credentials (1)
NuGet.Packaging (2)
NuGet.Protocol (1)
PresentationBuildTasks (4)
PresentationCore (17)
System\Windows\Navigation\BaseUriHelper.cs (5)
143string.Equals(PackUriHelper.GetPackageUri(uri).GetComponents(UriComponents.AbsoluteUri, UriFormat.UriEscaped),
179Debug.Assert(string.Equals(partName, uri.GetComponents(UriComponents.Path, UriFormat.UriEscaped), StringComparison.OrdinalIgnoreCase));
347if (Uri.Compare(sUri, SiteOfOriginBaseUri, UriComponents.Scheme, UriFormat.UriEscaped, StringComparison.OrdinalIgnoreCase) == 0)
350if (string.Equals(packageUri.GetComponents(UriComponents.AbsoluteUri, UriFormat.UriEscaped), _packageSiteOfOriginBaseUriEscaped, StringComparison.OrdinalIgnoreCase))
352return (new Uri(sUri.GetComponents(UriComponents.SchemeAndServer, UriFormat.UriEscaped))).MakeRelativeUri(sUri);
PresentationFramework (4)
PresentationUI (2)
ReachFramework (14)
System (1)
System.IO.Packaging (14)
System\IO\Packaging\PackUriHelper.cs (7)
43string serializedPartUri = partUri.GetComponents(UriComponents.SerializationInfoString, UriFormat.SafeUnescaped);
192if (Uri.Compare(partUri, PackageRootUri, UriComponents.SerializationInfoString, UriFormat.UriEscaped, StringComparison.Ordinal) == 0)
408UriComponents.KeepDelimiter, UriFormat.UriEscaped);
516UriFormat.UriEscaped,
533safeUnescapedUri = new Uri(partUri.GetComponents(UriComponents.SerializationInfoString, UriFormat.SafeUnescaped), UriKind.Relative);
539UriComponents.KeepDelimiter, UriFormat.SafeUnescaped), UriKind.Relative);
544string partName = safeUnescapedUri.GetComponents(UriComponents.SerializationInfoString, UriFormat.UriEscaped);
System.Net.Http (1)
System.Net.HttpListener (1)
System.Net.Requests (2)
System.Net.Security (1)
System.Private.DataContractSerialization (2)
System.Private.Uri (76)
System\Uri.cs (53)
546serializationInfo.AddValue("AbsoluteUri", GetParts(UriComponents.SerializationInfoString, UriFormat.UriEscaped)); // Do not rename (binary serialization)
550serializationInfo.AddValue("RelativeUri", GetParts(UriComponents.SerializationInfoString, UriFormat.UriEscaped)); // Do not rename (binary serialization)
688result = CombineUri(baseUri, relativeStr, dontEscape ? UriFormat.UriEscaped : UriFormat.SafeUnescaped);
749return info.Path ??= GetParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
763return info.AbsoluteUri ??= GetParts(UriComponents.AbsoluteUri, UriFormat.UriEscaped);
801return GetParts(UriComponents.Host | UriComponents.Port, UriFormat.UriEscaped);
902string result = GetParts(UriComponents.PathAndQuery, UriFormat.UriEscaped);
983return GetParts(UriComponents.Host, UriFormat.UriEscaped);
1087return GetUnescapedParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.Unescaped);
1128return info.Query ??= GetParts(UriComponents.Query | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1144return info.Fragment ??= GetParts(UriComponents.Fragment | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1275return GetParts(UriComponents.UserInfo, UriFormat.UriEscaped);
1362return GetParts(UriComponents.Scheme | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1380return GetParts(NonPathPart, UriFormat.UriEscaped);
1383return GetParts(NonPathPart | UriComponents.Path, UriFormat.UriEscaped);
1386return GetParts(NonPathPart | UriComponents.Path | UriComponents.Query, UriFormat.UriEscaped);
1551string remoteUrl = info.RemoteUrl ??= GetParts(components, UriFormat.SafeUnescaped);
1567private const UriFormat V1ToStringUnescape = (UriFormat)0x7FFF;
1580GetParts(UriComponents.AbsoluteUri, UriFormat.SafeUnescaped);
1606UriFormat uriFormat = V1ToStringUnescape;
1624uriFormat = UriFormat.SafeUnescaped;
1850string selfUrl = selfInfo.RemoteUrl ??= GetParts(components, UriFormat.SafeUnescaped);
1851string otherUrl = otherInfo.RemoteUrl ??= other.GetParts(components, UriFormat.SafeUnescaped);
1879relativeUriString += uri.GetParts(UriComponents.Query | UriComponents.Fragment, UriFormat.UriEscaped);
2559string host = _syntax.InternalGetComponents(this, UriComponents.Host, UriFormat.UriEscaped);
2591string portStr = _syntax.InternalGetComponents(this, UriComponents.StrongPort, UriFormat.UriEscaped);
2626internal string GetParts(UriComponents uriParts, UriFormat formatAs)
2667return RecreateParts(uriParts, nonCanonical, UriFormat.UriEscaped);
2670private string GetUnescapedParts(UriComponents uriParts, UriFormat formatAs)
2705private string RecreateParts(UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2722private bool TryRecreateParts(scoped Span<char> span, out int charsWritten, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2740private ReadOnlySpan<char> RecreateParts(scoped ref ValueStringBuilder dest, string str, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2768case UriFormat.UriEscaped:
2780case UriFormat.SafeUnescaped:
2788case UriFormat.Unescaped:
2832if (formatAs != UriFormat.UriEscaped && HostType == Flags.BasicHostType && (nonCanonical & (ushort)UriComponents.Host) != 0)
2835if (formatAs == UriFormat.Unescaped)
2920void FormatQueryOrFragment(ReadOnlySpan<char> slice, ref ValueStringBuilder dest, ushort nonCanonical, UriFormat formatAs, bool isQuery)
2928if (formatAs == UriFormat.UriEscaped)
2939else if (formatAs == UriFormat.Unescaped)
4182private void GetCanonicalPath(ref ValueStringBuilder dest, UriFormat formatAs)
4197if (formatAs == UriFormat.UriEscaped)
4292if (formatAs == UriFormat.UriEscaped && NotAny(Flags.UserEscaped) && InFact(Flags.E_PathNotCanonical))
4309if (formatAs != UriFormat.UriEscaped && InFact(Flags.PathNotCanonical))
4313if (formatAs == UriFormat.Unescaped)
4421private static string CombineUri(Uri basePart, string relativePart, UriFormat uriFormat)
4463ReadOnlySpan<char> share = basePart.GetParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.Unescaped);
4472return string.Concat(@"\\", basePart.GetParts(UriComponents.Host, UriFormat.Unescaped), share, relativePart);
4520basePart.IsImplicitFile ? UriFormat.Unescaped : uriFormat);
4600left = basePart.GetParts(UriComponents.Host, UriFormat.Unescaped);
4604left = @"\\" + basePart.GetParts(UriComponents.Host, UriFormat.Unescaped);
System.Private.Xml (1)
System.Runtime (1)
System.ServiceModel.Primitives (3)