Exemplo n.º 1
0
        /// <summary>
        /// Convert a <see cref="ConceptAs{T}"/> of type <see cref="System.Guid"/> to <see cref="System.Protobuf.guid"/>
        /// </summary>
        /// <param name="guid"><see cref="ConceptAs{T}"/> of type <see cref="System.Guid"/> to convert</param>
        /// <returns>Converted <see cref="System.Protobuf.guid"/></returns>
        public static System.Protobuf.guid ToProtobuf(this ConceptAs <System.Guid> guid)
        {
            var converted = new System.Protobuf.guid();

            converted.Value = ByteString.CopyFrom(guid.Value.ToByteArray());
            return(converted);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Convert a <see cref="ConceptAs{T}"/> of type <see cref="System.Guid"/> to <see cref="ByteString"/>.
 /// </summary>
 /// <param name="id"><see cref="ConceptAs{T}"/> of type <see cref="System.Guid"/> to convert.</param>
 /// <returns>Converted <see cref="ByteString"/>.</returns>
 public static ByteString ToProtobuf(this ConceptAs <System.Guid> id)
 {
     return(ByteString.CopyFrom(id.Value.ToByteArray()));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Convert a <see cref="ConceptAs{T}">Guid concept</see> to <see cref="System.Protobuf.guid"/>
 /// </summary>
 /// <param name="concept"><see cref="ConceptAs{T}"/> to convert from</param>
 /// <returns>Converted <see cref="System.Protobuf.guid"/></returns>
 public static System.Protobuf.guid ToProtobuf(this ConceptAs <Guid> concept)
 {
     return(concept.Value.ToProtobuf());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Convert a <see cref="ConceptAs{T}"/> of type <see cref="Guid"/> to <see cref="Contracts.Uuid"/>.
 /// </summary>
 /// <param name="id"><see cref="ConceptAs{T}"/> of type <see cref="Guid"/> to convert.</param>
 /// <returns>Converted <see cref="Contracts.Uuid"/>.</returns>
 public static Contracts.Uuid ToProtobuf(this ConceptAs <Guid> id) => id.Value.ToProtobuf();
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DidNotReceiveRegistrationResponse"/> class.
 /// </summary>
 /// <param name="kind">The kind of the event processor.</param>
 /// <param name="id">The <see cref="ConceptAs{T}"/> of type <see cref="Guid"/> that identifies the event processor.</param>
 public DidNotReceiveRegistrationResponse(string kind, ConceptAs <Guid> id)
     : base($"Did not receive registration response while registering {kind} {id}")
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RegistrationFailed"/> class.
 /// </summary>
 /// <param name="kind">The kind of the event processor.</param>
 /// <param name="id">The <see cref="ConceptAs{T}"/> of type <see cref="Guid"/> that identifies the event processor.</param>
 /// <param name="registerFailure">The <see cref="Failure"/> that occured.</param>
 public RegistrationFailed(string kind, ConceptAs <Guid> id, Failure registerFailure)
     : base($"Failure occurred during registration of {kind} {id}. {registerFailure.Reason}")
 {
 }