Exemplo n.º 1
0
        public bool IsEquivalentTo(ICSharpBinder other)
        {
            var otherBinder = other as CSharpGetIndexBinder;

            if (otherBinder == null)
            {
                return(false);
            }

            if (_callingContext != otherBinder._callingContext ||
                _argumentInfo.Length != otherBinder._argumentInfo.Length)
            {
                return(false);
            }

            return(BinderHelper.CompareArgInfos(_argumentInfo, otherBinder._argumentInfo));
        }
        public bool IsEquivalentTo(ICSharpBinder other)
        {
            var otherBinder = other as CSharpUnaryOperationBinder;

            if (otherBinder == null)
            {
                return(false);
            }

            if (Operation != otherBinder.Operation ||
                IsChecked != otherBinder.IsChecked ||
                _callingContext != otherBinder._callingContext)
            {
                return(false);
            }

            return(BinderHelper.CompareArgInfos(_argumentInfo, otherBinder._argumentInfo));
        }
Exemplo n.º 3
0
        public bool IsEquivalentTo(ICSharpBinder other)
        {
            var otherBinder = other as CSharpInvokeMemberBinder;

            if (otherBinder == null)
            {
                return(false);
            }

            if (Flags != otherBinder.Flags ||
                CallingContext != otherBinder.CallingContext ||
                Name != otherBinder.Name ||
                TypeArguments.Length != otherBinder.TypeArguments.Length ||
                _argumentInfo.Length != otherBinder._argumentInfo.Length)
            {
                return(false);
            }

            return(BinderHelper.CompareArgInfos(TypeArguments, otherBinder.TypeArguments, _argumentInfo, otherBinder._argumentInfo));
        }
Exemplo n.º 4
0
        public bool IsEquivalentTo(ICSharpBinder other)
        {
            var otherBinder = other as CSharpSetMemberBinder;

            if (otherBinder == null)
            {
                return(false);
            }

            if (Name != otherBinder.Name ||
                _callingContext != otherBinder._callingContext ||
                IsChecked != otherBinder.IsChecked ||
                IsCompoundAssignment != otherBinder.IsCompoundAssignment ||
                _argumentInfo.Length != otherBinder._argumentInfo.Length)
            {
                return(false);
            }

            return(BinderHelper.CompareArgInfos(_argumentInfo, otherBinder._argumentInfo));
        }