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
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
objectThe object to compare with the current object.
Returns
Equals(KnownProtocolPrefix?)
protected bool Equals(KnownProtocolPrefix? other)
Parameters
other
KnownProtocolPrefix
Returns
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
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
KnownProtocolPrefixThe left object
right
KnownProtocolPrefixThe 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
KnownProtocolPrefixThe left object
right
KnownProtocolPrefixThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.