213 references to UriFormat
Aspire.Dashboard (3)
Aspire.Hosting.OpenAI (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 (4)
Microsoft.NET.Build.Containers (2)
Microsoft.SourceLink.AzureDevOpsServer.Git (4)
Microsoft.SourceLink.AzureRepos.Git (4)
Microsoft.SourceLink.Bitbucket.Git (4)
Microsoft.SourceLink.Common (4)
Microsoft.SourceLink.Gitea (4)
Microsoft.SourceLink.Gitee (4)
Microsoft.SourceLink.GitHub (4)
Microsoft.SourceLink.GitLab (4)
Microsoft.SourceLink.GitWeb (4)
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)
42string serializedPartUri = partUri.GetComponents(UriComponents.SerializationInfoString, UriFormat.SafeUnescaped);
191if (Uri.Compare(partUri, PackageRootUri, UriComponents.SerializationInfoString, UriFormat.UriEscaped, StringComparison.Ordinal) == 0)
407UriComponents.KeepDelimiter, UriFormat.UriEscaped);
515UriFormat.UriEscaped,
532safeUnescapedUri = new Uri(partUri.GetComponents(UriComponents.SerializationInfoString, UriFormat.SafeUnescaped), UriKind.Relative);
538UriComponents.KeepDelimiter, UriFormat.SafeUnescaped), UriKind.Relative);
543string 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)
541serializationInfo.AddValue("AbsoluteUri", GetParts(UriComponents.SerializationInfoString, UriFormat.UriEscaped)); // Do not rename (binary serialization)
545serializationInfo.AddValue("RelativeUri", GetParts(UriComponents.SerializationInfoString, UriFormat.UriEscaped)); // Do not rename (binary serialization)
683result = CombineUri(baseUri, relativeStr, dontEscape ? UriFormat.UriEscaped : UriFormat.SafeUnescaped);
744return info.Path ??= GetParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
758return info.AbsoluteUri ??= GetParts(UriComponents.AbsoluteUri, UriFormat.UriEscaped);
796return GetParts(UriComponents.Host | UriComponents.Port, UriFormat.UriEscaped);
897string result = GetParts(UriComponents.PathAndQuery, UriFormat.UriEscaped);
978return GetParts(UriComponents.Host, UriFormat.UriEscaped);
1082return GetUnescapedParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.Unescaped);
1123return info.Query ??= GetParts(UriComponents.Query | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1139return info.Fragment ??= GetParts(UriComponents.Fragment | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1270return GetParts(UriComponents.UserInfo, UriFormat.UriEscaped);
1357return GetParts(UriComponents.Scheme | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1375return GetParts(NonPathPart, UriFormat.UriEscaped);
1378return GetParts(NonPathPart | UriComponents.Path, UriFormat.UriEscaped);
1381return GetParts(NonPathPart | UriComponents.Path | UriComponents.Query, UriFormat.UriEscaped);
1546string remoteUrl = info.RemoteUrl ??= GetParts(components, UriFormat.SafeUnescaped);
1562private const UriFormat V1ToStringUnescape = (UriFormat)0x7FFF;
1575GetParts(UriComponents.AbsoluteUri, UriFormat.SafeUnescaped);
1601UriFormat uriFormat = V1ToStringUnescape;
1619uriFormat = UriFormat.SafeUnescaped;
1845string selfUrl = selfInfo.RemoteUrl ??= GetParts(components, UriFormat.SafeUnescaped);
1846string otherUrl = otherInfo.RemoteUrl ??= other.GetParts(components, UriFormat.SafeUnescaped);
1874relativeUriString += uri.GetParts(UriComponents.Query | UriComponents.Fragment, UriFormat.UriEscaped);
2554string host = _syntax.InternalGetComponents(this, UriComponents.Host, UriFormat.UriEscaped);
2586string portStr = _syntax.InternalGetComponents(this, UriComponents.StrongPort, UriFormat.UriEscaped);
2621internal string GetParts(UriComponents uriParts, UriFormat formatAs)
2662return RecreateParts(uriParts, nonCanonical, UriFormat.UriEscaped);
2665private string GetUnescapedParts(UriComponents uriParts, UriFormat formatAs)
2700private string RecreateParts(UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2717private bool TryRecreateParts(scoped Span<char> span, out int charsWritten, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2735private ReadOnlySpan<char> RecreateParts(scoped ref ValueStringBuilder dest, string str, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2763case UriFormat.UriEscaped:
2775case UriFormat.SafeUnescaped:
2783case UriFormat.Unescaped:
2827if (formatAs != UriFormat.UriEscaped && HostType == Flags.BasicHostType && (nonCanonical & (ushort)UriComponents.Host) != 0)
2830if (formatAs == UriFormat.Unescaped)
2915void FormatQueryOrFragment(ReadOnlySpan<char> slice, ref ValueStringBuilder dest, ushort nonCanonical, UriFormat formatAs, bool isQuery)
2923if (formatAs == UriFormat.UriEscaped)
2934else if (formatAs == UriFormat.Unescaped)
4170private void GetCanonicalPath(ref ValueStringBuilder dest, UriFormat formatAs)
4185if (formatAs == UriFormat.UriEscaped)
4280if (formatAs == UriFormat.UriEscaped && NotAny(Flags.UserEscaped) && InFact(Flags.E_PathNotCanonical))
4297if (formatAs != UriFormat.UriEscaped && InFact(Flags.PathNotCanonical))
4301if (formatAs == UriFormat.Unescaped)
4409private static string CombineUri(Uri basePart, string relativePart, UriFormat uriFormat)
4451ReadOnlySpan<char> share = basePart.GetParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.Unescaped);
4460return string.Concat(@"\\", basePart.GetParts(UriComponents.Host, UriFormat.Unescaped), share, relativePart);
4508basePart.IsImplicitFile ? UriFormat.Unescaped : uriFormat);
4588left = basePart.GetParts(UriComponents.Host, UriFormat.Unescaped);
4592left = @"\\" + basePart.GetParts(UriComponents.Host, UriFormat.Unescaped);
System.Private.Xml (1)
System.Runtime (1)
System.ServiceModel.Primitives (3)