7 instantiations of ValidatedPartUri
System.IO.Packaging (7)
System\IO\Packaging\PackUriHelper.cs (7)
59return new ValidatedPartUri(partName); 244return new ValidatedPartUri(partName, isRelationshipUri: true); 306return new ValidatedPartUri(path, isRelationshipUri: false); 344validatedPartUri = new ValidatedPartUri(partUriString); 380return new ValidatedPartUri(partUriString); 861return new ValidatedPartUri(_normalizedPartUriString!, 898private static readonly Uri s_containerRelationshipNormalizedPartUri = new ValidatedPartUri("/_RELS/.RELS",
82 references to ValidatedPartUri
System.IO.Packaging (82)
System\IO\Packaging\Package.cs (23)
36_partList = new SortedList<PackUriHelper.ValidatedPartUri, PackagePart>(); // initial default is zero 225PackUriHelper.ValidatedPartUri validatedPartUri = PackUriHelper.ValidatePartUri(partUri); 289PackUriHelper.ValidatedPartUri validatePartUri = PackUriHelper.ValidatePartUri(partUri); 315PackUriHelper.ValidatedPartUri validatedPartUri = (PackUriHelper.ValidatedPartUri)PackUriHelper.ValidatePartUri(partUri); 322validatedPartUri = (PackUriHelper.ValidatedPartUri)value.Uri; 404PackUriHelper.ValidatedPartUri partUri; 406var uriComparer = Comparer<PackUriHelper.ValidatedPartUri>.Default; 409Array.Sort(parts, Comparer<PackagePart>.Create((partA, partB) => uriComparer.Compare((PackUriHelper.ValidatedPartUri)partA.Uri, (PackUriHelper.ValidatedPartUri)partB.Uri))); 417Dictionary<string, KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>> partDictionary = new(parts.Length); 422partUri = (PackUriHelper.ValidatedPartUri)parts[i].Uri; 441partDictionary.Add(normalizedPartName, new KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>(partUri, parts[i])); 979private void AddIfNoPrefixCollisionDetected(PackUriHelper.ValidatedPartUri partUri, PackagePart? part) 1064PackUriHelper.ValidatedPartUri[] partKeys = new PackUriHelper.ValidatedPartUri[_partList.Keys.Count]; 1066foreach (PackUriHelper.ValidatedPartUri uri in _partList.Keys) 1105PackUriHelper.ValidatedPartUri owningPartUri = 1106(PackUriHelper.ValidatedPartUri)PackUriHelper.GetSourcePartUriFromRelationshipPartUri(p.Uri); 1148PackUriHelper.ValidatedPartUri validatePartUri = PackUriHelper.ValidatePartUri(partUri); 1209private void CopyPartDictionaryToPartList(Dictionary<string, KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>> partDictionary, List<string> partIndex) 1214_partList = new SortedList<PackUriHelper.ValidatedPartUri, PackagePart>(partDictionary.Count); 1241private SortedList<PackUriHelper.ValidatedPartUri, PackagePart> _partList;
System\IO\Packaging\PackagePart.cs (1)
799private readonly PackUriHelper.ValidatedPartUri _uri;
System\IO\Packaging\PackagePartCollection.cs (2)
52internal PackagePartCollection(SortedList<PackUriHelper.ValidatedPartUri, PackagePart> partList) 62private readonly SortedList<PackUriHelper.ValidatedPartUri, PackagePart> _partList;
System\IO\Packaging\PackUriHelper.cs (27)
142ValidatedPartUri validatedUri = partUri as ValidatedPartUri ?? ValidatePartUri(partUri); 170return ((IComparable<ValidatedPartUri>)firstPartUri).CompareTo((ValidatedPartUri)secondPartUri); 190ValidatedPartUri validatedUri = partUri as ValidatedPartUri ?? ValidatePartUri(partUri); 228string partName = ((ValidatedPartUri)partUri).PartUriString; 287string path = ((ValidatedPartUri)relationshipPartUri).PartUriString; 326internal static bool TryValidatePartUri(Uri partUri, [NotNullWhen(true)] out ValidatedPartUri? validatedPartUri) 328var validatedUri = partUri as ValidatedPartUri; 364internal static ValidatedPartUri ValidatePartUri(Uri partUri) 366var validatedUri = partUri as ValidatedPartUri; 389ValidatedPartUri validatedUri = partUri as ValidatedPartUri ?? ValidatePartUri(partUri); 553Debug.Assert(!(partUri is ValidatedPartUri), "This method should only be called when we have not already validated the part uri"); 635internal sealed class ValidatedPartUri : Uri, IComparable<ValidatedPartUri>, IEquatable<ValidatedPartUri> 670int IComparable<ValidatedPartUri>.CompareTo(ValidatedPartUri? otherPartUri) 679bool IEquatable<ValidatedPartUri>.Equals(ValidatedPartUri? otherPartUri) 727internal ValidatedPartUri NormalizedPartUri => _normalizedPartUri ??= GetNormalizedPartUri(); 856private ValidatedPartUri GetNormalizedPartUri() 867private int Compare(ValidatedPartUri? otherPartUri) 883private ValidatedPartUri? _normalizedPartUri;
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (1)
322private static PackUriHelper.ValidatedPartUri? GetPartUriComponent(Uri packUri)
System\IO\Packaging\ZipPackage.cs (21)
55_ignoredItemHelper.Delete((PackUriHelper.ValidatedPartUri)partUri); 60string zipItemName = ((PackUriHelper.ValidatedPartUri)partUri).PartUriString.Substring(1); 65_contentTypeHelper.AddContentType((PackUriHelper.ValidatedPartUri)partUri, new ContentType(contentType), level); 67return new ZipPackagePart(this, zipArchiveEntry.Archive, zipArchiveEntry, _zipStreamManager, (PackUriHelper.ValidatedPartUri)partUri, contentType, compressionOption); 111PackUriHelper.ValidatedPartUri validatedUri = PackUriHelper.ValidatePartUri(partUri); 215if (PackUriHelper.TryValidatePartUri(partUri, out PackUriHelper.ValidatedPartUri? validatedPartUri)) 686PackUriHelper.ValidatedPartUri partUri = pieces[startIndex].PartUri!; 811internal void AddContentType(PackUriHelper.ValidatedPartUri partUri, ContentType contentType, 848internal ContentType? GetContentType(PackUriHelper.ValidatedPartUri partUri) 871internal void DeleteContentType(PackUriHelper.ValidatedPartUri partUri) 927foreach (PackUriHelper.ValidatedPartUri key in _overrideDictionary.Keys) 950_overrideDictionary ??= new Dictionary<PackUriHelper.ValidatedPartUri, ContentType>(OverrideDictionaryInitialSize); 1178PackUriHelper.ValidatedPartUri temporaryUri = PackUriHelper.ValidatePartUri( 1202PackUriHelper.ValidatedPartUri partUri = PackUriHelper.ValidatePartUri(new Uri(partNameAttributeValue!, UriKind.Relative)); 1232private void AddOverrideElement(PackUriHelper.ValidatedPartUri partUri, ContentType contentType) 1257private static void WriteOverrideElement(XmlWriter xmlWriter, PackUriHelper.ValidatedPartUri partUri, ContentType contentType) 1293private Dictionary<PackUriHelper.ValidatedPartUri, ContentType>? _overrideDictionary; 1382internal void AddItemForAtomicPart(PackUriHelper.ValidatedPartUri partUri, string zipFileName) 1434internal void Delete(PackUriHelper.ValidatedPartUri partUri) 1469private void AddItem(PackUriHelper.ValidatedPartUri? partUri, string normalizedPrefixName, string zipFileName) 1482private void UpdateExtensionDictionary(PackUriHelper.ValidatedPartUri partUri, string normalizedPrefixName)
System\IO\Packaging\ZipPackagePart.cs (2)
64PackUriHelper.ValidatedPartUri partUri, 84PackUriHelper.ValidatedPartUri partUri,
System\IO\Packaging\ZipPackagePartPiece.cs (5)
36bool success = TryParseName(zipArchiveEntry.FullName, out PackUriHelper.ValidatedPartUri? partUri, out string? prefixName, out int pieceNumber, out bool isLastPiece); 54internal static bool TryParseName(string path, [NotNullWhen(true)] out PackUriHelper.ValidatedPartUri? partUri, [NotNullWhen(true)] out string? prefixName, out int pieceNumber, out bool isLastPiece) 148internal static ZipPackagePartPiece Create(ZipArchive zipArchive, PackUriHelper.ValidatedPartUri? partUri, string prefixName, int pieceNumber, bool isLastPiece) 156internal ZipPackagePartPiece(ZipArchiveEntry zipArchiveEntry, PackUriHelper.ValidatedPartUri? partUri, string prefixName, int pieceNumber, bool isLastPiece) 188internal PackUriHelper.ValidatedPartUri? PartUri { get; }