ValuesType
PackageFCQRS
Factory methods for creating FCQRS's strongly-typed value/identifier types
(CID, AggregateId, MessageId, ShortString, LongString, Version) from C#.
Specification
Kind
Type
Members
12
Examples
0
CreateAggregateIdSignature
Values.CreateAggregateId(s)
CreateCIDSignature
Values.CreateCID(s)
CreateLongStringSignature
Values.CreateLongString(s)
CreateMessageIdSignature
Values.CreateMessageId(s)
CreateShortStringSignature
Values.CreateShortString(s)
Summary
| Name | Signature | Synopsis |
|---|---|---|
| CreateAggregateId | Values.CreateAggregateId(s) | Create an AggregateId from a string (throws on failure). |
| CreateCID | Values.CreateCID(s) | Create a CID from a string (throws on failure). |
| CreateLongString | Values.CreateLongString(s) | Create a LongString from a string (throws on failure) |
| CreateMessageId | Values.CreateMessageId(s) | Create a MessageId from a string (throws on failure) |
| CreateShortString | Values.CreateShortString(s) | Create a ShortString from a string (throws on failure) |
| CreateVersion | Values.CreateVersion(v) | Create a Version from a non-negative int64 (throws on failure) |
| NewCID | Values.NewCID() | Create a new CID from a GUID v7 |
| NewMessageId | Values.NewMessageId() | Create a new MessageId from a GUID v7 |
| TryCreateLongString | Values.TryCreateLongString(s, result) | Try to create a LongString, C# Try-pattern style: returns success + out value. |
| TryCreateLongString | Values.TryCreateLongString(s) | Try to create a LongString (returns Result instead of throwing) |
| TryCreateShortString | Values.TryCreateShortString(s, result) | Try to create a ShortString, C# Try-pattern style: returns success + out value. |
| TryCreateShortString | Values.TryCreateShortString(s) | Try to create a ShortString (returns Result instead of throwing) |
Create an AggregateId from a string (throws on failure).
Any non-blank id works: the shard names entity actors
Uri.EscapeDataString(entityId), so characters Akka actor names would
reject directly (spaces, %) are escaped before they reach an actor path.
Parameters
| Name | Type | Description |
|---|---|---|
| s | string |
Returns
AggregateId
Create a CID from a string (throws on failure).
A CID becomes part of pub-sub topics and saga entity names built with
"~" separators, so a CID containing "~" breaks the correlation parsing
(toRawGuid/toCid) and leaves sagas permanently deaf. Rejected here.
Parameters
| Name | Type | Description |
|---|---|---|
| s | string |
Returns
CID
Create a LongString from a string (throws on failure)
Parameters
| Name | Type | Description |
|---|---|---|
| s | string |
Returns
LongString
Create a MessageId from a string (throws on failure)
Parameters
| Name | Type | Description |
|---|---|---|
| s | string |
Returns
MessageId
Create a ShortString from a string (throws on failure)
Parameters
| Name | Type | Description |
|---|---|---|
| s | string |
Returns
ShortString
Create a Version from a non-negative int64 (throws on failure)
Parameters
| Name | Type | Description |
|---|---|---|
| v | int64 |
Returns
Version
Try to create a LongString, C# Try-pattern style: returns success + out value.
Parameters
| Name | Type | Description |
|---|---|---|
| s | string | |
| result | byref<LongString> |
Returns
bool
Try to create a LongString (returns Result instead of throwing)
Parameters
| Name | Type | Description |
|---|---|---|
| s | string |
Returns
Result<LongString, ModelError list>
Try to create a ShortString, C# Try-pattern style: returns success + out value.
Parameters
| Name | Type | Description |
|---|---|---|
| s | string | |
| result | byref<ShortString> |
Returns
bool