コード例 #1
0
 public static void Deconstruct(
     this MemberBinding expr,
     out MemberInfo member,
     out MemberBindingType memberType)
 {
     memberType = expr?.BindingType
                  ?? throw new ArgumentNullException(nameof(expr));
     member = expr.Member;
 }
コード例 #2
0
 public static void Deconstruct(
     this MemberAssignment expr,
     out Expression body,
     out MemberInfo member,
     out MemberBindingType binding)
 {
     body = expr?.Expression
            ?? throw new ArgumentNullException(nameof(expr));
     member  = expr.Member;
     binding = expr.BindingType;
 }
コード例 #3
0
 public static void Deconstruct(
     this MemberMemberBinding expr,
     out MemberInfo member,
     out List <MemberBinding> bindings,
     out MemberBindingType bindingType)
 {
     bindings = expr?.Bindings.ToList()
                ?? throw new ArgumentNullException(nameof(expr));
     member      = expr.Member;
     bindingType = expr.BindingType;
 }
コード例 #4
0
 public static void Deconstruct(
     this MemberListBinding expr,
     out MemberInfo member,
     out MemberBindingType bindingType,
     out List <ElementInit> initializers)
 {
     member = expr?.Member
              ?? throw new ArgumentNullException(nameof(expr));
     initializers = expr.Initializers.ToList();
     bindingType  = expr.BindingType;
 }
コード例 #5
0
        internal EvaluatedMemberBinding(MemberBindingType type, MemberInfo member)
        {
            BindingType = type;
            Member      = member;

            IsSuccess = true;
            IsSingle  = true;

            if (type == MemberBindingType.ListBinding)
            {
                EvaluatedInitializers = new List <EvaluatedListInitializer>();
            }

            if (type == MemberBindingType.MemberBinding)
            {
                EvaluatedBindings = new List <EvaluatedMemberBinding>();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MemberBindingRepresentationBase"/> class.
        /// </summary>
        /// <param name="type">The type with member.</param>
        /// <param name="memberInfo">The member info representation.</param>
        /// <param name="bindingType">Type of the binding.</param>
        protected MemberBindingRepresentationBase(
            TypeRepresentation type,
            MemberInfoRepresentation memberInfo,
            MemberBindingType bindingType)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            if (memberInfo == null)
            {
                throw new ArgumentNullException(nameof(memberInfo));
            }

            this.Type        = type;
            this.MemberInfo  = memberInfo;
            this.BindingType = bindingType;
        }
コード例 #7
0
        internal virtual MemberBinding VisitBinding(MemberBinding binding)
        {
            MemberBindingType bindingType = binding.BindingType;

            switch (bindingType)
            {
            case MemberBindingType.Assignment:
            {
                return(this.VisitMemberAssignment((MemberAssignment)binding));
            }

            case MemberBindingType.MemberBinding:
            {
                return(this.VisitMemberMemberBinding((MemberMemberBinding)binding));
            }

            case MemberBindingType.ListBinding:
            {
                return(this.VisitMemberListBinding((MemberListBinding)binding));
            }
            }
            throw new InvalidOperationException(String.Format("Unhandled Binding Type {0}", binding.BindingType));
        }
コード例 #8
0
        public static MemberBinding Visit(ITreeNodeBase parent, ITreeNode<Expression> parentBlock, MemberBindingType memberBindingType, XElement configurationElement, Type parentType)
        {
            BaseMemberBinding memberBinding = null;

            switch (memberBindingType)
            {
                case MemberBindingType.ListBinding:

                    memberBinding = new ListBindingInjector(parent, parentBlock, configurationElement, parentType);
                    break;

                case MemberBindingType.MemberBinding:

                    memberBinding = new MemberMemberBindingInjector(parent, parentBlock, configurationElement, parentType);
                    break;

                case MemberBindingType.Assignment:
                default:
                    memberBinding = new MemberAssignmentInjector(parent, parentBlock, configurationElement, parentType);
                    break;
            }

            return memberBinding.Value;
        }
コード例 #9
0
 protected MemberBinding(MemberBindingType type, MemberInfo member) {
     _type = type;
     _member = member;
 }
コード例 #10
0
 protected MemberBindingNode(INodeFactory factory, MemberBindingType bindingType, MemberInfo memberInfo)
     : base(factory)
 {
     this.BindingType = bindingType;
     this.Member      = new MemberInfoNode(this.Factory, memberInfo);
 }
コード例 #11
0
 protected MemberBinding(MemberBindingType type, MemberInfo member)
 {
     _type   = type;
     _member = member;
 }
コード例 #12
0
ファイル: Error.cs プロジェクト: Cireson/EntityFramework6
 internal static Exception UnhandledBindingType(MemberBindingType memberBindingType)
 {
     return new NotSupportedException(Strings.ELinq_UnhandledBindingType(memberBindingType));
 }
 protected MemberBinding(MemberBindingType type, System.Reflection.MemberInfo member)
 {
 }
コード例 #14
0
ファイル: MemberBinding.cs プロジェクト: x335/WootzJs
 public MemberBinding(MemberBindingType bindingType, MemberInfo member)
 {
     BindingType = bindingType;
     Member = member;
 }
コード例 #15
0
 protected EditableMemberBinding(MemberBindingType type, MemberInfo member)
 {
     BindingType = type;
     Member = member;
 }
コード例 #16
0
 internal static Exception UnhandledBindingType(MemberBindingType memberBindingType)
 {
     return(EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_UnhandledBindingType(memberBindingType)));
 }
コード例 #17
0
 protected MemberBinding(MemberBindingType type, System.Reflection.MemberInfo member)
 {
 }
コード例 #18
0
 public static Exception UnhandledBindingType(MemberBindingType bindingType)
 {
     return(new InvalidOperationException(String.Format(Strings.UnhandledBindingType, bindingType)));
 }
コード例 #19
0
 private static int CalcHashCode(MemberBindingType bindingType)
 {
     return((int)bindingType);
 }
コード例 #20
0
ファイル: MemberMemberBinding.cs プロジェクト: x335/WootzJs
 public MemberMemberBinding(MemberBindingType bindingType, MemberInfo member, List<MemberBinding> bindings) : base(bindingType, member)
 {
     Bindings = bindings;
 }
コード例 #21
0
 // Methods
 private Exception UnhandledBindingType(MemberBindingType memberBindingType)
 {
     throw new InvalidOperationException(string.Format("Unknown binding type '{0}'.", memberBindingType));
 }
コード例 #22
0
 internal MemberBinding(MemberBindingType bindingType, MemberInfo member)
 {
     BindingType = bindingType;
     Member      = member;
 }
    // Summary:
    //     Initializes a new instance of the System.Linq.Expressions.MemberBinding class.
    //
    // Parameters:
    //   type:
    //     The System.Linq.Expressions.MemberBindingType that discriminates the type
    //     of binding that is represented.
    //
    //   member:
    //     The System.Reflection.MemberInfo that represents a field or property to be
    //     initialized.

    protected MemberBinding(MemberBindingType type, MemberInfo member)
    {
      Contract.Requires(member != null);
    }
コード例 #24
0
ファイル: MemberBinding.cs プロジェクト: PlumpMath/CIL2Java
 //[ObsoleteAttribute("Do not use this constructor. It will be removed in future releases.")]
 protected MemberBinding(MemberBindingType type, MemberInfo member)
 {
     throw new NotImplementedException();
 }
コード例 #25
0
ファイル: MemberBinding.cs プロジェクト: yuuhhe/db4o
 internal MemberBinding(MemberBindingType binding_type, MemberInfo member)
 {
     this.binding_type = binding_type;
     this.member       = member;
 }
コード例 #26
0
        // Summary:
        //     Initializes a new instance of the System.Linq.Expressions.MemberBinding class.
        //
        // Parameters:
        //   type:
        //     The System.Linq.Expressions.MemberBindingType that discriminates the type
        //     of binding that is represented.
        //
        //   member:
        //     The System.Reflection.MemberInfo that represents a field or property to be
        //     initialized.

        protected MemberBinding(MemberBindingType type, MemberInfo member)
        {
            Contract.Requires(member != null);
        }
コード例 #27
0
 protected SerializableMemberBinding(SerializationInfo info, StreamingContext context)
 {
     Member      = info.GetString("Member").GetMemberFromSerializableForm();
     BindingType = (MemberBindingType)Enum.Parse(typeof(MemberBindingType), info.GetString("BindingType"));
 }
コード例 #28
0
 public static Exception UnhandledBindingType(MemberBindingType bindingType)
 {
     return(new NotSupportedException(string.Format("Unknown LINQ binding of type '{0}'.", bindingType)));
 }
コード例 #29
0
 protected MemberBinding(MemberBindingType type, MemberInfo member)
 {
     this._type   = type;
     this._member = member;
 }
コード例 #30
0
 protected EditableMemberBinding(MemberBindingType type, MemberInfo member)
 {
     BindingType = type;
     Member      = member;
 }
コード例 #31
0
 protected MemberBinding(MemberBindingType bindingType, MemberInfo member)
 {
     _bindingType = bindingType;
     _member = member;
 }
コード例 #32
0
ファイル: Error.cs プロジェクト: vojtechvit/entityframework
 internal static Exception UnhandledBindingType(MemberBindingType memberBindingType)
 {
     return(new NotSupportedException(Strings.ELinq_UnhandledBindingType(memberBindingType)));
 }
コード例 #33
0
 public MemberListBinding(MemberBindingType bindingType, MemberInfo member, List <ElementInit> initializers) : base(bindingType, member)
 {
     Initializers = initializers;
 }
コード例 #34
0
		protected MemberBinding (MemberBindingType binding_type, MemberInfo member)
		{
			this.binding_type = binding_type;
			this.member = member;
		}
コード例 #35
0
 public MemberBinding(MemberBindingType bindingType, MemberInfo member)
 {
     BindingType = bindingType;
     Member      = member;
 }
コード例 #36
0
 public override MemberBindingRepresentationBase DeepCloneWithBindingType(MemberBindingType bindingType)
 {
     throw new NotSupportedException("The constructor in-use (by code gen) for MemberAssignmentRepresentation does not have a parameter that corresponds with the 'BindingType' property.  As such, this method, DeepCloneWithBindingType(MemberBindingType bindingType), cannot utilize the specified 'bindingType' value for that property.");
 }
コード例 #37
0
 public virtual MemberBindingRepresentationBase DeepCloneWithBindingType(MemberBindingType bindingType)
 {
     throw new NotImplementedException("This method should be abstract.  It was generated as virtual so that you aren't forced to override it when you create a new model that derives from this model.  It will be overridden in the generated designer file.");
 }
コード例 #38
0
ファイル: Error.cs プロジェクト: hugufc/data-linq
 public static Exception UnhandledBindingType(MemberBindingType bindingType)
 {
     return(new InvalidOperationException("UnhandledBindingType: " + bindingType + "."));
 }
コード例 #39
0
 protected MemberBindingNode(NodeContext factory, MemberBindingType bindingType, MemberInfo memberInfo) : base(factory)
 {
     BindingType = bindingType;
     Member = new MemberInfoNode(Context, memberInfo);
 }
コード例 #40
0
 protected MemberBinding(MemberBindingType binding_type, MemberInfo member)
 {
     this.binding_type = binding_type;
     this.member       = member;
 }
コード例 #41
0
 protected MemberBindingNode(INodeFactory factory, MemberBindingType bindingType, MemberInfo memberInfo)
     : base(factory)
 {
     this.BindingType = bindingType;
     this.Member = new MemberInfoNode(this.Factory, memberInfo);
 }
コード例 #42
0
ファイル: BindTests.cs プロジェクト: criteo-forks/runtime
            public BogusBinding(MemberBindingType type, MemberInfo member)
#pragma warning disable 618
                : base(type, member)
#pragma warning restore 618
            {
            }
コード例 #43
0
		internal MemberBinding (MemberBindingType binding_type, MemberInfo member)
		{
			this.binding_type = binding_type;
			this.member = member;
		}