Table of Contents

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

string

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

string

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

string

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

string

Properties

Feeds

A list of Feeds contained within this catalog.

[Browsable(false)]
[OrderedEquality]
public List<Feed> Feeds { get; }

Property Value

List<Feed>

this[FeedUri]

Returns the Feed with a specific URI.

public Feed this[FeedUri uri] { get; }

Parameters

uri FeedUri

The Uri to look for.

Property Value

Feed

The identified Feed.

Exceptions

KeyNotFoundException

No Feed matching uri was found in Feeds.

Methods

Clone()

Creates a deep copy of this Catalog instance.

public Catalog Clone()

Returns

Catalog

The new copy of the Catalog.

ContainsFeed(FeedUri)

Determines whether this catalog contains a Feed with a specific URI.

public bool ContainsFeed(FeedUri uri)

Parameters

uri FeedUri

The Uri to look for.

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 object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Catalog?)

protected bool Equals(Catalog? other)

Parameters

other Catalog

Returns

bool

FindByShortName(string?)

Returns the first Feed that matches a specific short name.

public Feed? FindByShortName(string? shortName)

Parameters

shortName string

The short name to look for. Must match either Name or BinaryName of NameRun.

Returns

Feed

The first matching Feed; null if no match was found.

GetFeed(FeedUri)

Returns the Feed with a specific URI. Safe for missing elements.

public Feed? GetFeed(FeedUri uri)

Parameters

uri FeedUri

The Uri to look for.

Returns

Feed

The identified Feed; null if no matching entry was found.

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 FeedUri

The 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 string

The 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

left Catalog

The left object

right Catalog

The right object

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

left Catalog

The left object

right Catalog

The right object

Returns

bool

true if the objects are not equal; otherwise, false.