示例#1
0
		public bool OpEquals (ISwiftEquatable other)
		{
			if (this == other)
				return true;
			var otherProxy = other as SwiftEquatableProxy;
			if (otherProxy != null) {
				return actualImpl.OpEquals (otherProxy.actualImpl);
			}
			return actualImpl.OpEquals (other);
		}
示例#2
0
        public bool OpEquals(ISwiftEquatable other)
        {
            if (this == other)
            {
                return(true);
            }
            var otherProxy = other as SwiftComparableProxy;

            if (otherProxy != null)
            {
                return(actualImpl.OpEquals(otherProxy.actualImpl));
            }
            var otherEqProxy = other as SwiftEquatableProxy;

            if (otherEqProxy != null)
            {
                // why switch the order? Because otherEqProxy will go through its actualImpl.
                return(otherEqProxy.OpEquals(actualImpl));
            }
            return(actualImpl.OpEquals(other));
        }
            public bool OpEquals(ISwiftEquatable other)
            {
                var otherEqClass = other as EqClass;

                return(otherEqClass != null && otherEqClass.X == X);
            }
示例#4
0
		public SwiftEquatableProxy (ISwiftEquatable actualImplementation, EveryProtocol everyProtocol)
			: base (typeof (ISwiftEquatable), everyProtocol)
		{
			actualImpl = actualImplementation;
		}