Show / Hide Table of Contents

Class Catalog

Contains a list of Feeds, reduced to only contain information relevant for overview lists.

Inheritance
Object
XmlUnknown
Catalog
Implements
IEquatable<XmlUnknown>
ICloneable<Catalog>
IEquatable<Catalog>
Inherited Members
XmlUnknown.UnknownAttributes
XmlUnknown.UnknownElements
XmlUnknown.EnsureAttribute(Object, String)
XmlUnknown.EnsureAttributeSafeID(String, String)
XmlUnknown.ToShortXml()
XmlUnknown.Equals(XmlUnknown)
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public class Catalog : XmlUnknown
Remarks

See also: https://docs.0install.net/specifications/catalog/

Constructors

Catalog()

Declaration
public Catalog()

Fields

SchemaLocation

Provides XML Editors with location hints for XSD files.

Declaration
public string SchemaLocation
Field Value
Type Description
String

XmlNamespace

The XML namespace used for storing feed catalogs. Used in combination with XmlNamespace.

Declaration
public const string XmlNamespace = "http://0install.de/schema/injector/catalog"
Field Value
Type Description
String

XsdLocation

The URI to retrieve an XSD containing the XML Schema information for this class in serialized form.

Declaration
public const string XsdLocation = "https://docs.0install.net/specifications/catalog.xsd"
Field Value
Type Description
String

XsiSchemaLocation

Provides XML Editors with location hints for XSD files.

Declaration
public const string XsiSchemaLocation = "http://0install.de/schema/injector/catalog https://docs.0install.net/specifications/catalog.xsd"
Field Value
Type Description
String

Properties

Feeds

A list of Feeds contained within this catalog.

Declaration
public List<Feed> Feeds { get; }
Property Value
Type Description
List<Feed>

Item[FeedUri]

Returns the Feed with a specific URI.

Declaration
public Feed this[FeedUri uri] { get; }
Parameters
Type Name Description
FeedUri uri

The Uri to look for.

Property Value
Type Description
Feed

The identified Feed.

Exceptions
Type Condition
KeyNotFoundException

No Feed matching uri was found in Feeds.

Methods

Clone()

Creates a deep copy of this Catalog instance.

Declaration
public Catalog Clone()
Returns
Type Description
Catalog

The new copy of the Catalog.

ContainsFeed(FeedUri)

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

Declaration
public bool ContainsFeed(FeedUri uri)
Parameters
Type Name Description
FeedUri uri

The Uri to look for.

Returns
Type Description
Boolean

true if a matching feed was found; false otherwise.

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean

Equals(Catalog)

Declaration
public bool Equals(Catalog other)
Parameters
Type Name Description
Catalog other
Returns
Type Description
Boolean

FindByShortName(String)

Returns the first Feed that matches a specific short name.

Declaration
public Feed FindByShortName(string shortName)
Parameters
Type Name Description
String shortName

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

Returns
Type Description
Feed

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

GetFeed(FeedUri)

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

Declaration
public Feed GetFeed(FeedUri uri)
Parameters
Type Name Description
FeedUri uri

The Uri to look for.

Returns
Type Description
Feed

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

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
XmlUnknown.GetHashCode()

Normalize(FeedUri)

Normalizes the catalog and all feeds it contains. Flattens inheritance structures, converts legacy elements, sets default values, etc..

Declaration
public void Normalize(FeedUri catalogUri = null)
Parameters
Type Name Description
FeedUri catalogUri

The URI the catalog was originally loaded from.

Exceptions
Type Condition
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.

Declaration
public IEnumerable<Feed> Search(string query)
Parameters
Type Name Description
String query

The search query. Must be contained within Name or BinaryName of NameRun.

Returns
Type Description
IEnumerable<Feed>

All Feeds matching query.

Operators

Equality(Catalog, Catalog)

Indicates whether the object on the left is equal to the object on the right.

Declaration
public static bool operator ==(Catalog left, Catalog right)
Parameters
Type Name Description
Catalog left

The left object

Catalog right

The right object

Returns
Type Description
Boolean

true if the objects are equal; otherwise, false.

Inequality(Catalog, Catalog)

Indicates whether the object on the left is not equal to the object on the right.

Declaration
public static bool operator !=(Catalog left, Catalog right)
Parameters
Type Name Description
Catalog left

The left object

Catalog right

The right object

Returns
Type Description
Boolean

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

Implements

System.IEquatable<T>
ICloneable<T>
System.IEquatable<T>
In This Article
Back to top Copyright Bastian Eicher et al