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.
public class KnownProtocolPrefix : XmlUnknown, ICloneable<KnownProtocolPrefix>, IEquatable<KnownProtocolPrefix>
- Inheritance
-
objectKnownProtocolPrefix
- Implements
- Inherited Members
Constructors
KnownProtocolPrefix()
public KnownProtocolPrefix()
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 virtual KnownProtocolPrefix Clone()
Returns
- KnownProtocolPrefix
The new copy of the KnownProtocolPrefix.
CloneFromTo(KnownProtocolPrefix, KnownProtocolPrefix)
Copies all members declared by KnownProtocolPrefix from one instance to another.
protected static void CloneFromTo(KnownProtocolPrefix from, KnownProtocolPrefix to)
Parameters
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(KnownProtocolPrefix?)
protected bool Equals(KnownProtocolPrefix? other)
Parameters
otherKnownProtocolPrefix
Returns
GetHashCode()
public override int GetHashCode()
Returns
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
leftKnownProtocolPrefixThe left object
rightKnownProtocolPrefixThe 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
leftKnownProtocolPrefixThe left object
rightKnownProtocolPrefixThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.