Zero Install .NET API 2.20.0
ZeroInstall.Model.Catalog Class Reference

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

Inheritance diagram for ZeroInstall.Model.Catalog:
ZeroInstall.Model.XmlUnknown NanoByte.Common.ICloneable< Catalog >

Public Member Functions

bool ContainsFeed (FeedUri uri)
 Determines whether this catalog contains a Feed with a specific URI. More...
 
FeedGetFeed (FeedUri uri)
 Returns the Feed with a specific URI. Safe for missing elements. More...
 
FeedFindByShortName (string? shortName)
 Returns the first Feed that matches a specific short name. More...
 
IEnumerable< FeedSearch (string? query)
 Returns all Feeds that match a specific search query. More...
 
void Normalize ()
 Runs Feed.Normalize on all contained Feeds. More...
 
Catalog Clone ()
 Creates a deep copy of this Catalog instance. More...
 
bool Equals (Catalog? other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
- Public Member Functions inherited from ZeroInstall.Model.XmlUnknown
string ToShortXml ()
 Returns a shortened XML representation (with attributes but without child elements). More...
 
override int GetHashCode ()
 
- Public Member Functions inherited from NanoByte.Common.ICloneable< Catalog >
Catalog Clone ()
 

Public Attributes

string SchemaLocation = XsiSchemaLocation
 Provides XML Editors with location hints for XSD files.
 
- Public Attributes inherited from ZeroInstall.Model.XmlUnknown
XmlAttribute?[] UnknownAttributes
 Contains any unknown additional XML attributes.
 
XmlElement?[] UnknownElements
 Contains any unknown additional XML elements.
 

Static Public Attributes

const string XmlNamespace = "http://0install.de/schema/injector/catalog"
 The XML namespace used for storing feed catalogs. Used in combination with Feed.XmlNamespace.
 
const string XsdLocation = "https://docs.0install.net/specifications/catalog.xsd"
 The URI to retrieve an XSD containing the XML Schema information for this class in serialized form.
 
const string XsiSchemaLocation = XmlNamespace + " " + XsdLocation
 Provides XML Editors with location hints for XSD files.
 

Properties

List< FeedFeeds = new() [get]
 A list of Feeds contained within this catalog.
 
Feed this[FeedUri uri] [get]
 Returns the Feed with a specific URI. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ZeroInstall.Model.XmlUnknown
void EnsureAttribute (object? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null). More...
 
void EnsureAttributeSafeID (string? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null) and only contains alphanumeric characters, spaces ( ), dots (.), underscores (_), hyphens (-) and plus signs (+). More...
 
bool Equals (XmlUnknown? other)
 

Detailed Description

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

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

Member Function Documentation

◆ Clone()

Catalog ZeroInstall.Model.Catalog.Clone ( )
inline

Creates a deep copy of this Catalog instance.

Returns
The new copy of the Catalog.

◆ ContainsFeed()

bool ZeroInstall.Model.Catalog.ContainsFeed ( FeedUri  uri)
inline

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

Parameters
uriThe Feed.Uri to look for.
Returns
true if a matching feed was found; false otherwise.

◆ FindByShortName()

Feed? ZeroInstall.Model.Catalog.FindByShortName ( string?  shortName)
inline

Returns the first Feed that matches a specific short name.

Parameters
shortNameThe short name to look for. Must match either Feed.Name or EntryPoint.BinaryName of Command.NameRun.
Returns
The first matching Feed; null if no match was found.

◆ GetFeed()

Feed? ZeroInstall.Model.Catalog.GetFeed ( FeedUri  uri)
inline

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

Parameters
uriThe Feed.Uri to look for.
Returns
The identified Feed; null if no matching entry was found.

◆ Normalize()

void ZeroInstall.Model.Catalog.Normalize ( )
inline

Runs Feed.Normalize on all contained Feeds.

This method should be called to prepare a Catalog for solver processing. Do not call it if you plan on serializing the catalog again since it may loose some of its structure.

◆ Search()

IEnumerable< Feed > ZeroInstall.Model.Catalog.Search ( string?  query)
inline

Returns all Feeds that match a specific search query.

Parameters
queryThe search query. Must be contained within Feed.Name or EntryPoint.BinaryName of Command.NameRun.
Returns
All Feeds matching query .

Property Documentation

◆ this[FeedUri uri]

Feed ZeroInstall.Model.Catalog.this[FeedUri uri]
get

Returns the Feed with a specific URI.

Parameters
uriThe Feed.Uri to look for.
Returns
The identified Feed.
Exceptions
KeyNotFoundExceptionNo Feed matching uri was found in Feeds.

The documentation for this class was generated from the following file: