179 references to UriFormat
Aspire.Dashboard (2)
Aspire.Hosting.OpenAI (1)
dotnet-svcutil-lib (5)
Microsoft.AspNetCore.Authentication.Test (12)
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.Extensions.AI.Abstractions (1)
netstandard (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 (77)
System\Uri.cs (54)
540serializationInfo.AddValue("AbsoluteUri", GetParts(UriComponents.SerializationInfoString, UriFormat.UriEscaped)); // Do not rename (binary serialization)
544serializationInfo.AddValue("RelativeUri", GetParts(UriComponents.SerializationInfoString, UriFormat.UriEscaped)); // Do not rename (binary serialization)
694result = CombineUri(baseUri, relativeStr, dontEscape ? UriFormat.UriEscaped : UriFormat.SafeUnescaped);
764return info.Path ??= GetParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
778return info.AbsoluteUri ??= GetParts(UriComponents.AbsoluteUri, UriFormat.UriEscaped);
816return GetParts(UriComponents.Host | UriComponents.Port, UriFormat.UriEscaped);
917string result = GetParts(UriComponents.PathAndQuery, UriFormat.UriEscaped);
998return GetParts(UriComponents.Host, UriFormat.UriEscaped);
1102return GetUnescapedParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.Unescaped);
1143return info.Query ??= GetParts(UriComponents.Query | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1159return info.Fragment ??= GetParts(UriComponents.Fragment | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1298return GetParts(UriComponents.UserInfo, UriFormat.UriEscaped);
1396return GetParts(UriComponents.Scheme | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
1414return GetParts(NonPathPart, UriFormat.UriEscaped);
1417return GetParts(NonPathPart | UriComponents.Path, UriFormat.UriEscaped);
1420return GetParts(NonPathPart | UriComponents.Path | UriComponents.Query, UriFormat.UriEscaped);
1585string remoteUrl = info.RemoteUrl ??= GetParts(components, UriFormat.SafeUnescaped);
1601private const UriFormat V1ToStringUnescape = (UriFormat)0x7FFF;
1614GetParts(UriComponents.AbsoluteUri, UriFormat.SafeUnescaped);
1640UriFormat uriFormat = V1ToStringUnescape;
1658uriFormat = UriFormat.SafeUnescaped;
1884string selfUrl = selfInfo.RemoteUrl ??= GetParts(components, UriFormat.SafeUnescaped);
1885string otherUrl = otherInfo.RemoteUrl ??= other.GetParts(components, UriFormat.SafeUnescaped);
1913relativeUriString += uri.GetParts(UriComponents.Query | UriComponents.Fragment, UriFormat.UriEscaped);
2627string host = _syntax.InternalGetComponents(this, UriComponents.Host, UriFormat.UriEscaped);
2670string portStr = _syntax.InternalGetComponents(this, UriComponents.StrongPort, UriFormat.UriEscaped);
2705internal string GetParts(UriComponents uriParts, UriFormat formatAs)
2746return RecreateParts(uriParts, nonCanonical, UriFormat.UriEscaped);
2749private string GetUnescapedParts(UriComponents uriParts, UriFormat formatAs)
2784private string RecreateParts(UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2801private bool TryRecreateParts(scoped Span<char> span, out int charsWritten, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2819private ReadOnlySpan<char> RecreateParts(scoped ref ValueStringBuilder dest, string str, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
2847case UriFormat.UriEscaped:
2859case UriFormat.SafeUnescaped:
2867case UriFormat.Unescaped:
2899if (formatAs != UriFormat.UriEscaped && HostType == Flags.BasicHostType
2903mode = formatAs == UriFormat.Unescaped
2988if (formatAs == UriFormat.UriEscaped)
3004UriFormat.Unescaped => UnescapeMode.Unescape | UnescapeMode.UnescapeAll,
3027if (formatAs == UriFormat.UriEscaped)
3043UriFormat.Unescaped => UnescapeMode.Unescape | UnescapeMode.UnescapeAll,
4330private unsafe void GetCanonicalPath(ref ValueStringBuilder dest, UriFormat formatAs)
4345if (formatAs == UriFormat.UriEscaped)
4453if (formatAs == UriFormat.UriEscaped && NotAny(Flags.UserEscaped) && InFact(Flags.E_PathNotCanonical))
4470if (formatAs != UriFormat.UriEscaped && InFact(Flags.PathNotCanonical))
4483case UriFormat.Unescaped:
4610private static string CombineUri(Uri basePart, string relativePart, UriFormat uriFormat)
4652ReadOnlySpan<char> share = basePart.GetParts(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.Unescaped);
4661return string.Concat(@"\\", basePart.GetParts(UriComponents.Host, UriFormat.Unescaped), share, relativePart);
4709basePart.IsImplicitFile ? UriFormat.Unescaped : uriFormat);
4789left = basePart.GetParts(UriComponents.Host, UriFormat.Unescaped);
4793left = @"\\" + basePart.GetParts(UriComponents.Host, UriFormat.Unescaped);
System.Private.Xml (1)
System.Runtime (1)
System.ServiceModel.Primitives (3)