You've already forked linux-packaging-mono
Imported Upstream version 3.10.0
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
@ -119,10 +119,10 @@ namespace System.IO.Packaging
|
||||
public static void PartUriIsValid (Uri partUri)
|
||||
{
|
||||
if (!partUri.OriginalString.StartsWith ("/"))
|
||||
throw new UriFormatException ("PartUris must start with '/'");
|
||||
throw new ArgumentException ("PartUris must start with '/'");
|
||||
|
||||
if (partUri.IsAbsoluteUri)
|
||||
throw new UriFormatException ("PartUris cannot be absolute");
|
||||
throw new ArgumentException ("PartUris cannot be absolute");
|
||||
}
|
||||
|
||||
public static void RelationshipTypeIsValid (string relationshipType)
|
||||
|
@ -42,24 +42,28 @@ namespace System.IO.Packaging {
|
||||
|
||||
public static int ComparePackUri (Uri firstPackUri, Uri secondPackUri)
|
||||
{
|
||||
// FIXME: Do i need to do validation that it is a pack:// uri?
|
||||
if (firstPackUri == null)
|
||||
return secondPackUri == null ? 0 : -1;
|
||||
if (secondPackUri == null)
|
||||
return 1;
|
||||
|
||||
Check.PackUriIsValid (firstPackUri);
|
||||
Check.PackUriIsValid (secondPackUri);
|
||||
|
||||
// FIXME: What exactly is compared. Lets assume originalstring
|
||||
return firstPackUri.OriginalString.CompareTo (secondPackUri.OriginalString);
|
||||
}
|
||||
|
||||
public static int ComparePartUri (Uri firstPartUri, Uri secondPartUri)
|
||||
{
|
||||
// FIXME: Do i need to do validation that it is a part URI?
|
||||
if (firstPartUri == null)
|
||||
return secondPartUri == null ? 0 : -1;
|
||||
if (secondPartUri == null)
|
||||
return 1;
|
||||
|
||||
Check.PartUriIsValid (firstPartUri);
|
||||
Check.PartUriIsValid (secondPartUri);
|
||||
|
||||
return firstPartUri.OriginalString.CompareTo (secondPartUri.OriginalString);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user