Class ServiceMoniker
- Namespace
- Microsoft.ServiceHub.Framework
- Assembly
- Microsoft.ServiceHub.Framework.dll
An identifier for an activatable service.
[TypeConverter(typeof(ServiceMoniker.ServiceMonikerTypeConverter))]
[JsonObject]
[DataContract]
public class ServiceMoniker : IEquatable<ServiceMoniker>
- Inheritance
-
ServiceMoniker
- Implements
- Inherited Members
Constructors
ServiceMoniker(string)
Initializes a new instance of the ServiceMoniker class.
public ServiceMoniker(string name)
Parameters
namestringThe name of the service.
ServiceMoniker(string, Version?)
Initializes a new instance of the ServiceMoniker class.
[JsonConstructor]
[JsonConstructor]
[ConstructorShape]
public ServiceMoniker(string name, Version? version)
Parameters
namestringThe name of the service.
versionVersionThe version of the service or expected by the client. May be null.
Properties
Name
Gets the name of the service.
[DataMember]
public string Name { get; }
Property Value
Version
Gets the version of the service or the version expected by the client.
[JsonConverter(typeof(VersionConverter))]
[DataMember]
public Version? Version { get; }
Property Value
Methods
Equals(ServiceMoniker?)
public bool Equals(ServiceMoniker? other)
Parameters
otherServiceMoniker
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(ServiceMoniker?, ServiceMoniker?)
Equality comparison operator.
public static bool operator ==(ServiceMoniker? left, ServiceMoniker? right)
Parameters
leftServiceMonikerLeft operand.
rightServiceMonikerRight operand.
Returns
operator !=(ServiceMoniker?, ServiceMoniker?)
Inequality comparison operator.
public static bool operator !=(ServiceMoniker? left, ServiceMoniker? right)
Parameters
leftServiceMonikerLeft operand.
rightServiceMonikerRight operand.