Example #1
0
 public void MergeFrom(EventMetadata other)
 {
     if (other == null)
     {
         return;
     }
     if (other.eventId_ != null)
     {
         if (eventId_ == null)
         {
             eventId_ = new global::System.Protobuf.guid();
         }
         EventId.MergeFrom(other.EventId);
     }
     if (other.source_ != null)
     {
         if (source_ == null)
         {
             source_ = new global::Dolittle.Runtime.Events.Relativity.Protobuf.VersionedEventSource();
         }
         Source.MergeFrom(other.Source);
     }
     if (other.correlationId_ != null)
     {
         if (correlationId_ == null)
         {
             correlationId_ = new global::System.Protobuf.guid();
         }
         CorrelationId.MergeFrom(other.CorrelationId);
     }
     if (other.artifact_ != null)
     {
         if (artifact_ == null)
         {
             artifact_ = new global::Dolittle.Runtime.Events.Relativity.Protobuf.Artifact();
         }
         Artifact.MergeFrom(other.Artifact);
     }
     if (other.Occurred != 0L)
     {
         Occurred = other.Occurred;
     }
     if (other.originalContext_ != null)
     {
         if (originalContext_ == null)
         {
             originalContext_ = new global::Dolittle.Runtime.Events.Relativity.Protobuf.OriginalContext();
         }
         OriginalContext.MergeFrom(other.OriginalContext);
     }
 }
Example #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (eventId_ == null)
                    {
                        eventId_ = new global::System.Protobuf.guid();
                    }
                    input.ReadMessage(eventId_);
                    break;
                }

                case 18: {
                    if (source_ == null)
                    {
                        source_ = new global::Dolittle.Runtime.Events.Relativity.Protobuf.VersionedEventSource();
                    }
                    input.ReadMessage(source_);
                    break;
                }

                case 26: {
                    if (correlationId_ == null)
                    {
                        correlationId_ = new global::System.Protobuf.guid();
                    }
                    input.ReadMessage(correlationId_);
                    break;
                }

                case 34: {
                    if (artifact_ == null)
                    {
                        artifact_ = new global::Dolittle.Runtime.Events.Relativity.Protobuf.Artifact();
                    }
                    input.ReadMessage(artifact_);
                    break;
                }

                case 40: {
                    Occurred = input.ReadInt64();
                    break;
                }

                case 50: {
                    if (originalContext_ == null)
                    {
                        originalContext_ = new global::Dolittle.Runtime.Events.Relativity.Protobuf.OriginalContext();
                    }
                    input.ReadMessage(originalContext_);
                    break;
                }
                }
            }
        }