Exemplo n.º 1
0
        internal static MemberBindingNode Create(INodeFactory factory, MemberBinding memberBinding)
        {
            MemberBindingNode memberBindingNode = null;

            if (memberBinding is MemberAssignment)
                memberBindingNode = new MemberAssignmentNode(factory, (MemberAssignment)memberBinding);
            else if (memberBinding is MemberListBinding)
                memberBindingNode = new MemberListBindingNode(factory, (MemberListBinding)memberBinding);
            else if (memberBinding is MemberMemberBinding)
                memberBindingNode = new MemberMemberBindingNode(factory, (MemberMemberBinding)memberBinding);
            else if (memberBinding != null)
                throw new ArgumentException("Unknown member binding of type " + memberBinding.GetType(), "memberBinding");

            return memberBindingNode;
        }
Exemplo n.º 2
0
        internal static MemberBindingNode Create(INodeFactory factory, MemberBinding memberBinding)
        {
            MemberBindingNode memberBindingNode = null;

            if (memberBinding is MemberAssignment)
            {
                memberBindingNode = new MemberAssignmentNode(factory, (MemberAssignment)memberBinding);
            }
            else if (memberBinding is MemberListBinding)
            {
                memberBindingNode = new MemberListBindingNode(factory, (MemberListBinding)memberBinding);
            }
            else if (memberBinding is MemberMemberBinding)
            {
                memberBindingNode = new MemberMemberBindingNode(factory, (MemberMemberBinding)memberBinding);
            }
            else if (memberBinding != null)
            {
                throw new ArgumentException("Unknown member binding of type " + memberBinding.GetType(), "memberBinding");
            }

            return(memberBindingNode);
        }