Class Catalog
- Namespace
- ZeroInstall.Model
- Assembly
- ZeroInstall.Model.dll
Contains a list of Feeds, reduced to only contain information relevant for overview lists.
[Serializable]
[XmlNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance")]
[Equatable]
public class Catalog : XmlUnknown, IEquatable<XmlUnknown>, ICloneable<Catalog>, IEquatable<Catalog>
- Inheritance
-
Catalog
- Implements
- Inherited Members
Remarks
Fields
SchemaLocation
Provides XML Editors with location hints for XSD files.
public string SchemaLocation
Field Value
XmlNamespace
The XML namespace used for storing feed catalogs. Used in combination with XmlNamespace.
public const string XmlNamespace = "http://0install.de/schema/injector/catalog"
Field Value
XsdLocation
The URI to retrieve an XSD containing the XML Schema information for this class in serialized form.
public const string XsdLocation = "https://docs.0install.net/specifications/catalog.xsd"
Field Value
XsiSchemaLocation
Provides XML Editors with location hints for XSD files.
public const string XsiSchemaLocation = "http://0install.de/schema/injector/catalog https://docs.0install.net/specifications/catalog.xsd"
Field Value
Properties
Feeds
A list of Feeds contained within this catalog.
[Browsable(false)]
[OrderedEquality]
public List<Feed> Feeds { get; }
Property Value
this[FeedUri]
Returns the Feed with a specific URI.
public Feed this[FeedUri uri] { get; }
Parameters
Property Value
Exceptions
Methods
Clone()
Creates a deep copy of this Catalog instance.
public Catalog Clone()
Returns
ContainsFeed(FeedUri)
Determines whether this catalog contains a Feed with a specific URI.
public bool ContainsFeed(FeedUri uri)
Parameters
Returns
- bool
true
if a matching feed was found;false
otherwise.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
Equals(Catalog?)
protected bool Equals(Catalog? other)
Parameters
other
Catalog
Returns
FindByShortName(string?)
Returns the first Feed that matches a specific short name.
public Feed? FindByShortName(string? shortName)
Parameters
shortName
stringThe short name to look for. Must match either Name or BinaryName of NameRun.
Returns
GetFeed(FeedUri)
Returns the Feed with a specific URI. Safe for missing elements.
public Feed? GetFeed(FeedUri uri)
Parameters
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Normalize(FeedUri?)
Normalizes the catalog and all feeds it contains. Flattens inheritance structures, converts legacy elements, sets default values, etc..
public void Normalize(FeedUri? catalogUri = null)
Parameters
catalogUri
FeedUriThe URI the catalog was originally loaded from.
Exceptions
- NotSupportedException
The catalog requires a newer version of Zero Install.
- InvalidDataException
A required property is not set or invalid.
Search(string?)
Returns all Feeds that match a specific search query.
public IEnumerable<Feed> Search(string? query)
Parameters
query
stringThe search query. Must be contained within Name or BinaryName of NameRun.
Returns
- IEnumerable<Feed>
All Feeds matching
query
.
Operators
operator ==(Catalog?, Catalog?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(Catalog? left, Catalog? right)
Parameters
Returns
- bool
true if the objects are equal; otherwise, false.
operator !=(Catalog?, Catalog?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(Catalog? left, Catalog? right)
Parameters
Returns
- bool
true if the objects are not equal; otherwise, false.