Table of Contents

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

name string

The 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

name string

The name of the service.

version Version

The 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

string

Version

Gets the version of the service or the version expected by the client.

[JsonConverter(typeof(VersionConverter))]
[DataMember]
public Version? Version { get; }

Property Value

Version

Methods

Equals(ServiceMoniker?)

public bool Equals(ServiceMoniker? other)

Parameters

other ServiceMoniker

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ServiceMoniker?, ServiceMoniker?)

Equality comparison operator.

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

Parameters

left ServiceMoniker

Left operand.

right ServiceMoniker

Right operand.

Returns

bool

true if the left and right operand are equivalent.

operator !=(ServiceMoniker?, ServiceMoniker?)

Inequality comparison operator.

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

Parameters

left ServiceMoniker

Left operand.

right ServiceMoniker

Right operand.

Returns

bool

true if the left and right operand are different.