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