Example #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TransactionId.Length != 0)
            {
                hash ^= TransactionId.GetHashCode();
            }
            if (CommandId.Length != 0)
            {
                hash ^= CommandId.GetHashCode();
            }
            if (WorkflowId.Length != 0)
            {
                hash ^= WorkflowId.GetHashCode();
            }
            if (effectiveAt_ != null)
            {
                hash ^= EffectiveAt.GetHashCode();
            }
            hash ^= events_.GetHashCode();
            if (Offset.Length != 0)
            {
                hash ^= Offset.GetHashCode();
            }
            if (traceContext_ != null)
            {
                hash ^= TraceContext.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is ProcessingFee other &&
                   ((EffectiveAt == null && other.EffectiveAt == null) || (EffectiveAt?.Equals(other.EffectiveAt) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)));
        }
Example #3
0
 public void MergeFrom(TransactionTree other)
 {
     if (other == null)
     {
         return;
     }
     if (other.TransactionId.Length != 0)
     {
         TransactionId = other.TransactionId;
     }
     if (other.CommandId.Length != 0)
     {
         CommandId = other.CommandId;
     }
     if (other.WorkflowId.Length != 0)
     {
         WorkflowId = other.WorkflowId;
     }
     if (other.effectiveAt_ != null)
     {
         if (effectiveAt_ == null)
         {
             EffectiveAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         EffectiveAt.MergeFrom(other.EffectiveAt);
     }
     if (other.Offset.Length != 0)
     {
         Offset = other.Offset;
     }
     eventsById_.Add(other.eventsById_);
     rootEventIds_.Add(other.rootEventIds_);
     if (other.traceContext_ != null)
     {
         if (traceContext_ == null)
         {
             TraceContext = new global::Com.DigitalAsset.Ledger.Api.V1.TraceContext();
         }
         TraceContext.MergeFrom(other.TraceContext);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Example #4
0
        public override int GetHashCode()
        {
            int hashCode = 1083651961;

            if (EffectiveAt != null)
            {
                hashCode += EffectiveAt.GetHashCode();
            }

            if (Type != null)
            {
                hashCode += Type.GetHashCode();
            }

            if (AmountMoney != null)
            {
                hashCode += AmountMoney.GetHashCode();
            }

            return(hashCode);
        }