CkMethodIds
Namespace: Meshmakers.Octo.ConstructionKit.Contracts
Builds and parses qualified CK method ids (CK v2, AB#5669). A qualified method id is model-version-less:
{declaringRtCkTypeId.SemanticVersionedFullName}.{methodId}, e.g.
System.Identity/User.ChangePassword-1. It is the routing key of a method (queue names, registry).
public static class CkMethodIds
Inheritance Object → CkMethodIds
Methods
GeneratedName(CkTypeId, String)
F1.4-S2 (review L15): the generated C# name of a type method — type class name plus method name, the
method version appended when above 1 (User + ChangePassword-2 → UserChangePassword2).
Used for the {Name}MethodId constant and the {Name}Parameters / {Name}Result
records; the compiler rejects two methods of a model with the same name (message 125).
public static string GeneratedName(CkTypeId ckTypeId, string methodId)
Parameters
ckTypeId CkTypeId
methodId String
Returns
MethodClassName(String)
ChangePassword-1 → ChangePassword, ChangePassword-2 → ChangePassword2.
public static string MethodClassName(string methodId)
Parameters
methodId String
Returns
Qualify(RtCkId<CkTypeId>, String)
Returns the qualified method id of methodId declared on declaringCkTypeId.
public static string Qualify(RtCkId<CkTypeId> declaringCkTypeId, string methodId)
Parameters
declaringCkTypeId RtCkId<CkTypeId>
The runtime id of the CK type that declares the method
methodId String
The element-versioned method id, e.g. ChangePassword-1
Returns
TryParse(String, out RtCkId`1, out String)
Parses a qualified method id produced by CkMethodIds.Qualify(RtCkId<CkTypeId>, String). The method id is the part after the
last '.' that follows the last '/', so dotted model and type names
(System.Identity/Some.Type.Do-1) parse correctly.
public static bool TryParse(string qualifiedMethodId, out RtCkId`1 declaringCkTypeId, out String methodId)
Parameters
qualifiedMethodId String
The qualified method id
declaringCkTypeId RtCkId`1
The runtime id of the declaring CK type
methodId String
The element-versioned method id
Returns
Boolean
True when the value is a well-formed qualified method id