Table of Contents

Class KnownProtocolPrefix

Namespace
ZeroInstall.Model.Capabilities
Assembly
ZeroInstall.Model.dll

Names a well-known protocol prefix. Used for protocols that are shared across many applications (e.g. HTTP, FTP) but not for application-specific protocols.

[Serializable]
[Equatable]
public class KnownProtocolPrefix : XmlUnknown, IEquatable<XmlUnknown>, ICloneable<KnownProtocolPrefix>, IEquatable<KnownProtocolPrefix>
Inheritance
KnownProtocolPrefix
Implements
Inherited Members

Properties

Value

The value of the prefix (e.g. "http").

public required string Value { get; set; }

Property Value

string

Methods

Clone()

Creates a deep copy of this KnownProtocolPrefix instance.

public KnownProtocolPrefix Clone()

Returns

KnownProtocolPrefix

The new copy of the KnownProtocolPrefix.

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(KnownProtocolPrefix?)

protected bool Equals(KnownProtocolPrefix? other)

Parameters

other KnownProtocolPrefix

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Normalize()

Converts legacy elements, sets default values, etc..

public void Normalize()

Exceptions

InvalidDataException

A required property is not set or invalid.

ToString()

Returns the prefix in the form "Value". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(KnownProtocolPrefix?, KnownProtocolPrefix?)

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

public static bool operator ==(KnownProtocolPrefix? left, KnownProtocolPrefix? right)

Parameters

left KnownProtocolPrefix

The left object

right KnownProtocolPrefix

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(KnownProtocolPrefix?, KnownProtocolPrefix?)

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

public static bool operator !=(KnownProtocolPrefix? left, KnownProtocolPrefix? right)

Parameters

left KnownProtocolPrefix

The left object

right KnownProtocolPrefix

The right object

Returns

bool

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

See Also