public static void Deconstruct( this MemberBinding expr, out MemberInfo member, out MemberBindingType memberType) { memberType = expr?.BindingType ?? throw new ArgumentNullException(nameof(expr)); member = expr.Member; }
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; }
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; }
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; }
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; }
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)); }
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; }
protected MemberBinding(MemberBindingType type, MemberInfo member) { _type = type; _member = member; }
protected MemberBindingNode(INodeFactory factory, MemberBindingType bindingType, MemberInfo memberInfo) : base(factory) { this.BindingType = bindingType; this.Member = new MemberInfoNode(this.Factory, memberInfo); }
internal static Exception UnhandledBindingType(MemberBindingType memberBindingType) { return new NotSupportedException(Strings.ELinq_UnhandledBindingType(memberBindingType)); }
protected MemberBinding(MemberBindingType type, System.Reflection.MemberInfo member) { }
public MemberBinding(MemberBindingType bindingType, MemberInfo member) { BindingType = bindingType; Member = member; }
protected EditableMemberBinding(MemberBindingType type, MemberInfo member) { BindingType = type; Member = member; }
internal static Exception UnhandledBindingType(MemberBindingType memberBindingType) { return(EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_UnhandledBindingType(memberBindingType))); }
public static Exception UnhandledBindingType(MemberBindingType bindingType) { return(new InvalidOperationException(String.Format(Strings.UnhandledBindingType, bindingType))); }
private static int CalcHashCode(MemberBindingType bindingType) { return((int)bindingType); }
public MemberMemberBinding(MemberBindingType bindingType, MemberInfo member, List<MemberBinding> bindings) : base(bindingType, member) { Bindings = bindings; }
// Methods private Exception UnhandledBindingType(MemberBindingType memberBindingType) { throw new InvalidOperationException(string.Format("Unknown binding type '{0}'.", memberBindingType)); }
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); }
//[ObsoleteAttribute("Do not use this constructor. It will be removed in future releases.")] protected MemberBinding(MemberBindingType type, MemberInfo member) { throw new NotImplementedException(); }
internal MemberBinding(MemberBindingType binding_type, MemberInfo member) { this.binding_type = binding_type; this.member = member; }
protected SerializableMemberBinding(SerializationInfo info, StreamingContext context) { Member = info.GetString("Member").GetMemberFromSerializableForm(); BindingType = (MemberBindingType)Enum.Parse(typeof(MemberBindingType), info.GetString("BindingType")); }
public static Exception UnhandledBindingType(MemberBindingType bindingType) { return(new NotSupportedException(string.Format("Unknown LINQ binding of type '{0}'.", bindingType))); }
protected MemberBinding(MemberBindingType type, MemberInfo member) { this._type = type; this._member = member; }
protected MemberBinding(MemberBindingType bindingType, MemberInfo member) { _bindingType = bindingType; _member = member; }
internal static Exception UnhandledBindingType(MemberBindingType memberBindingType) { return(new NotSupportedException(Strings.ELinq_UnhandledBindingType(memberBindingType))); }
public MemberListBinding(MemberBindingType bindingType, MemberInfo member, List <ElementInit> initializers) : base(bindingType, member) { Initializers = initializers; }
protected MemberBinding (MemberBindingType binding_type, MemberInfo member) { this.binding_type = binding_type; this.member = member; }
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."); }
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."); }
public static Exception UnhandledBindingType(MemberBindingType bindingType) { return(new InvalidOperationException("UnhandledBindingType: " + bindingType + ".")); }
protected MemberBindingNode(NodeContext factory, MemberBindingType bindingType, MemberInfo memberInfo) : base(factory) { BindingType = bindingType; Member = new MemberInfoNode(Context, memberInfo); }
protected MemberBinding(MemberBindingType binding_type, MemberInfo member) { this.binding_type = binding_type; this.member = member; }
public BogusBinding(MemberBindingType type, MemberInfo member) #pragma warning disable 618 : base(type, member) #pragma warning restore 618 { }
internal MemberBinding (MemberBindingType binding_type, MemberInfo member) { this.binding_type = binding_type; this.member = member; }