예제 #1
0
        public bool Equals(ConventionInfoDto other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Id.Equals(other.Id) &&
                   RequestId.Equals(other.RequestId) &&
                   CountryId.Equals(other.CountryId) &&
                   EarlyRegTypeId.Equals(other.EarlyRegTypeId) &&
                   string.Equals((string)RegNumberInternationalApp, (string)other.RegNumberInternationalApp) &&
                   string.Equals((string)PublishRegNumberInternationalApp,
                                 (string)other.PublishRegNumberInternationalApp) &&
                   string.Equals((string)RegNumberEurasianApp, (string)other.RegNumberEurasianApp) &&
                   string.Equals((string)PublishRegNumberEurasianApp, (string)other.PublishRegNumberEurasianApp) &&
                   string.Equals((string)HeadIps, (string)other.HeadIps) &&
                   Object.Equals(DateInternationalApp, other.DateInternationalApp) &&
                   Object.Equals(PublishDateInternationalApp, other.PublishDateInternationalApp) &&
                   Object.Equals(DateEurasianApp, other.DateEurasianApp) &&
                   Object.Equals(PublishDateEurasianApp, other.PublishDateEurasianApp) &&
                   Object.Equals(InternationalAppToNationalPhaseTransferDate,
                                 other.InternationalAppToNationalPhaseTransferDate) &&
                   Object.Equals(TermNationalPhaseFirsChapter, other.TermNationalPhaseFirsChapter) &&
                   Object.Equals(TermNationalPhaseSecondChapter, other.TermNationalPhaseSecondChapter));
        }
        /// <summary>
        /// Returns true if ValidationError instances are equal
        /// </summary>
        /// <param name="other">Instance of ValidationError to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ValidationError other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     RequestId == other.RequestId ||
                     RequestId != null &&
                     RequestId.Equals(other.RequestId)
                     ) &&
                 (
                     ErrorType == other.ErrorType ||
                     ErrorType != null &&
                     ErrorType.Equals(other.ErrorType)
                 ) &&
                 (
                     ErrorCodes == other.ErrorCodes ||
                     ErrorCodes != null &&
                     ErrorCodes.Equals(other.ErrorCodes)
                 ));
        }
예제 #3
0
        /// <summary>
        /// Returns true if Message instances are equal
        /// </summary>
        /// <param name="other">Instance of Message to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Message other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     RequestId == other.RequestId ||
                     RequestId != null &&
                     RequestId.Equals(other.RequestId)
                     ) &&
                 (
                     Destination == other.Destination ||
                     Destination != null &&
                     Destination.Equals(other.Destination)
                 ) &&
                 (
                     Payload == other.Payload ||
                     Payload != null &&
                     Payload.Equals(other.Payload)
                 ));
        }
예제 #4
0
        public void TestEquals_DifferentObjectType()
        {
            var id            = Int32.MaxValue;
            var requestIdType = RequestIdType.FinancialInfo;
            var actionType    = RequestActionType.Update;
            var instance      = new RequestId(id, requestIdType, actionType);

            Assert.IsFalse(instance.Equals(1));
        }
예제 #5
0
        public void TestEquals_SameInstance()
        {
            var id            = Int32.MaxValue;
            var requestIdType = RequestIdType.FinancialInfo;
            var actionType    = RequestActionType.Update;

            var instance = new RequestId(id, requestIdType, actionType);

            Assert.IsTrue(instance.Equals(instance));
        }
예제 #6
0
        public void TestEquals_DifferentRequestId()
        {
            var id            = Int32.MaxValue;
            var requestIdType = RequestIdType.FinancialInfo;
            var actionType    = RequestActionType.Update;

            var firstInstance  = new RequestId(id, requestIdType, actionType);
            var secondInstance = new RequestId(id + 1, requestIdType, actionType);

            Assert.IsFalse(firstInstance.Equals(secondInstance));
        }
예제 #7
0
 /// <inheritdoc />
 public bool Equals(Request other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Type == other.Type && IsSelect == other.IsSelect && Query == other.Query &&
            AcceptRetries == other.AcceptRetries && Priority == other.Priority &&
            RequestId.Equals(other.RequestId) && IsRetried == other.IsRetried &&
            CurrentRetryAttempt == other.CurrentRetryAttempt);
 }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            ProxyRequestContext that = obj as ProxyRequestContext;

            return(ServiceId.Equals(that.ServiceId) &&
                   Path.Equals(that.Path) &&
                   HttpMethod.Equals(that.HttpMethod) &&
                   RequestId.Equals(that.RequestId) &&
                   Identity.Equals(that.Identity) &&
                   SourceIp.Equals(that.SourceIp) &&
                   Stage.Equals(that.Stage));
        }
예제 #9
0
 public bool Equals(PermissionLookup other) =>
 Message.Equals(other.Message) &&
 RequestingUser.Equals(other.RequestingUser) &&
 RepositoryName.Equals(other.RepositoryName) &&
 RequestId.Equals(other.RequestId);