예제 #1
0
        public void MemberNameIsEqualReturnsFalseWhenTypeNameIsDifferent()
        {
            MemberName lhs = new MemberName("type1", "method");
            MemberName rhs = new MemberName("type2", "method");

            Assert.IsFalse(lhs.Equals(rhs));
        }
예제 #2
0
        public void MemberNameIsEqualReturnsTrueWhenNameAndTypeAreSame()
        {
            MemberName lhs = new MemberName("type", "member");
            MemberName rhs = new MemberName("type", "member");

            Assert.IsTrue(lhs.Equals(rhs));
        }
예제 #3
0
        private string GetWhere()
        {
            string where = "";
            string query = Request.Url.Query;

            if ((!MemberName.Equals("")) || MemberName != null)
            {
                where += "&MemberName=" + BLL.Util.EscapeString(MemberName);
            }
            where += "&npd=1&random=" + (new Random()).Next().ToString();
            return(where);
        }
예제 #4
0
        public void MemberNameIsEqualsReturnsFalseWhenMemberNameIsNull()
        {
            MemberName lhs = new MemberName("type", "Member");

            Assert.IsFalse(lhs.Equals(null));
        }
예제 #5
0
 public override bool CanOverride(AutoGenerateContext context)
 {
     return(context.ParentType == Type && MemberName.Equals(context.GenerateName, StringComparison.OrdinalIgnoreCase));
 }
예제 #6
0
 public bool Equals(ValueMemberValue other)
 => (MemberName.Equals(other.MemberName) &&
     (ValueType?.Equals(other.ValueType) ?? false))
         ? Object.Equals(this.Value, other.Value)
         : false;