コード例 #1
0
        /// <summary>
        /// Returns true if PolicySubmit instances are equal
        /// </summary>
        /// <param name="other">Instance of PolicySubmit to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PolicySubmit other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Value1 == other.Value1 ||
                     Value1 != null &&
                     Value1.Equals(other.Value1)
                     ) &&
                 (
                     Value2 == other.Value2 ||
                     Value2 != null &&
                     Value2.Equals(other.Value2)
                 ) &&
                 (
                     Value3 == other.Value3 ||
                     Value3 != null &&
                     Value3.Equals(other.Value3)
                 ));
        }
コード例 #2
0
 private void SampleCommandExecute(string digit)
 {
     if (Operator == OperatorType.NONE)
     {
         if (Value1 != null && Value1.Equals("0"))
         {
             Value1 = digit;
         }
         else
         {
             Value1 += digit;
         }
     }
     else
     {
         if (Value2 != null && Value2.Equals("0"))
         {
             Value2 = digit;
         }
         else
         {
             Value2 += digit;
         }
     }
 }
コード例 #3
0
ファイル: Pair.cs プロジェクト: Pacman29/CompilerCourse
 public bool SamePair(Pair <T> obj)
 {
     return(Equals(obj) ||
            (!Object.ReferenceEquals(null, obj) &&
             Value1.Equals(obj.Value2) &&
             Value2.Equals(obj.Value1)));
 }
コード例 #4
0
 public Task Execute(IBotEngine instance)
 {
     if (Value1.Equals(Player.Cell, StringComparison.OrdinalIgnoreCase))
     {
         instance.Index++;
     }
     return(Task.FromResult <object>(null));
 }
コード例 #5
0
 public bool Equals(AreaSpriteCommand other)
 {
     return(!Size.Equals(other.Size)
         ? false
         : !Value1.Equals(other.Value1) || Value2.Equals(other.Value2)
             ? false
             : Size == 2 || Value3.Equals(other.Value3));
 }
コード例 #6
0
ファイル: Pair.cs プロジェクト: Pacman29/CompilerCourse
        public override bool Equals(object obj)
        {
            var v = obj as Pair <T>;

            return(!Object.ReferenceEquals(null, v) &&
                   Value1.Equals(v.Value1) &&
                   Value2.Equals(v.Value2));
        }
コード例 #7
0
 public bool Equals(AreaObjectCommand other)
 {
     return(!Size.Equals(other.Size)
         ? false
         : !Value1.Equals(other.Value1) || !Value2.Equals(other.Value2)
         ? false
         : Size == 3
         ? Value3.Equals(other.Value3)
         : true);
 }
コード例 #8
0
        public override bool Equals(object obj)
        {
            if (!(obj is Tuple <T1, T2>))
            {
                return(false);
            }
            if (obj == null)
            {
                return(false);
            }

            Tuple <T1, T2> t = (Tuple <T1, T2>)obj;

            return(Value1.Equals(t.Value1) && Value2.Equals(t.Value2));
        }
コード例 #9
0
 protected bool Equals(TestEntityWithAllTypes other)
 {
     return
         (Id == other.Id &&
          Value1.Equals(other.Value1) &&
          Value2.Equals(other.Value2) &&
          Value3.Equals(other.Value3) &&
          Value4.Equals(other.Value4) &&
          Value5.Equals(other.Value5) &&
          Value6.Equals(other.Value6) &&
          Value7.Equals(other.Value7) &&
          Value8.Equals(other.Value8) &&
          Value9.Equals(other.Value9) &&
          Value10.Equals(other.Value10) &&
          Value12.IsEquals(other.Value12) &&
          string.Equals(Value14, other.Value14) &&
          Value15.Equals(other.Value15));
 }
コード例 #10
0
        /// <summary>
        /// Returns true if Policy instances are equal
        /// </summary>
        /// <param name="other">Instance of Policy to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Policy other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Uuid == other.Uuid ||
                     Uuid != null &&
                     Uuid.Equals(other.Uuid)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Value1 == other.Value1 ||
                     Value1 != null &&
                     Value1.Equals(other.Value1)
                 ) &&
                 (
                     Value2 == other.Value2 ||
                     Value2 != null &&
                     Value2.Equals(other.Value2)
                 ) &&
                 (
                     Value3 == other.Value3 ||
                     Value3 != null &&
                     Value3.Equals(other.Value3)
                 ));
        }
コード例 #11
0
        public bool Equals(Condition other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (CompareOperator != other.CompareOperator)
            {
                return(false);
            }

            return(Value1.Equals(other.Value1) && Value2.Equals(other.Value2));
        }
コード例 #12
0
 /// <summary>
 /// Determines if the two are equal
 /// </summary>
 /// <param name="Value1">Value 1</param>
 /// <param name="Value2">Value 2</param>
 /// <returns>True if they are equal, false otherwise</returns>
 public static bool operator ==(FormatBase <FormatType, ContentType> Value1, FormatBase <FormatType, ContentType> Value2)
 {
     return(Value1.Equals(Value2));
 }
コード例 #13
0
 public bool Equals(AreaHeader other)
 {
     return(Value1.Equals(other.Value1) && Value2.Equals(other.Value2));
 }
コード例 #14
0
 public bool Equals(Group other)
 {
     return(Value1.Equals(other.Value1) &&
            Value2.Equals(other.Value2) &&
            Operation == other.Operation);
 }
コード例 #15
0
ファイル: FileBaseClass.cs プロジェクト: JaCraig/FileCurator
 /// <summary>
 /// Determines if the two are equal
 /// </summary>
 /// <param name="Value1">Value 1</param>
 /// <param name="Value2">Value 2</param>
 /// <returns>True if they are equal, false otherwise</returns>
 public static bool operator ==(FileBaseClass <FormatFileType> Value1, FileBaseClass <FormatFileType> Value2)
 {
     return(Value1.Equals(Value2));
 }
コード例 #16
0
 public bool Equals(AreaObjectCommand other)
 {
     return(Value1.Equals(other.Value1) && Value2.Equals(other.Value2));
 }