Exemplo n.º 1
0
 public MemberParentReferenceDecoratingExpression(IMemberParentReferenceExpression containedExpression, params IDecorationExpression[] decorations)
 {
     this.ContainedExpression = containedExpression;
     if (decorations != null && decorations.Length > 0)
     {
         this.decorations = new MalleableExpressionCollection <IDecorationExpression>(decorations);
     }
 }
 /// <summary>
 /// Obtains a reference expression which refers to the current
 /// <see cref="FieldMember"/> with the <paramref name="source"/>
 /// that leads up to it.
 /// </summary>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// which leads up to the field.</param>
 /// <returns>A <see cref="IFieldReferenceExpression"/> which refers to the current
 /// <see cref="FieldMember"/> with the <paramref name="source"/>
 /// that leads up to it.</returns>
 public IFieldReferenceExpression GetReference(IMemberParentReferenceExpression source)
 {
     if (source != null)
     {
         throw new ArgumentOutOfRangeException("source");
     }
     return(new ReferenceExpression(this, this.Parent.GetTypeExpression()));
 }
 public FieldReferenceExpression(TField member, IMemberParentReferenceExpression source)
 {
     if (member == null)
     {
         throw new ArgumentNullException("member");
     }
     this.Member = member;
     this.Source = source;
 }
 /// <summary>
 /// Creates a new <see cref="UnboundMethodReferenceStub"/> with the
 /// <paramref name="source"/>,
 /// <paramref name="genericParameters"/> and
 /// <paramref name="referenceType"/> provdied.
 /// </summary>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// from which the <see cref="UnboundMethodReferenceStub"/> was sourced.</param>
 /// <param name="genericParameters">The <see cref="ITypeCollection"/>
 /// of generic parameter replacements for the signature.</param>
 /// <param name="referenceType">The means to refer to
 /// the method.</param>
 public MethodReferenceStubBase(IMemberParentReferenceExpression source, IControlledTypeCollection genericParameters = null, MethodReferenceType referenceType = MethodReferenceType.VirtualMethodReference)
 {
     if (genericParameters != null)
     {
         this.genericParameters = genericParameters is ILockedTypeCollection ? ((ILockedTypeCollection)(genericParameters)) : genericParameters.ToLockedCollection();
     }
     this.referenceType = referenceType;
     this.source        = source;
 }
Exemplo n.º 5
0
                public ReferenceExpression(FieldMember owner, IMemberParentReferenceExpression source)
                {
                    if (owner == null)
                    {
                        throw new ArgumentNullException("owner");
                    }

                    this.owner  = owner;
                    this.Source = source;
                }
 /// <summary>
 /// Creates a new <see cref="UnboundMethodReferenceStub"/> with
 /// the <paramref name="source"/>, and <paramref name="name"/>
 /// provided.
 /// </summary>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// from which the <see cref="UnboundMethodReferenceStub"/> was sourced.</param>
 /// <param name="name">A <see cref="System.String"/>
 /// relative to the name of the method.</param>
 public UnboundMethodReferenceStub(IMemberParentReferenceExpression source, string name)
     : base(source)
 {
     this.name = name;
 }
 /// <summary>
 /// Creates a new <see cref="UnboundMethodReferenceStub"/> with the
 /// <paramref name="source"/>, <paramref name="name"/>, and
 /// <paramref name="genericParameters"/> provdied.
 /// </summary>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// from which the <see cref="UnboundMethodReferenceStub"/> was sourced.</param>
 /// <param name="name">A <see cref="System.String"/>
 /// relative to the name of the method.</param>
 /// <param name="genericParameters">The <see cref="ITypeCollection"/>
 /// of generic parameter replacements for the signature.</param>
 public UnboundMethodReferenceStub(IMemberParentReferenceExpression source, string name, IControlledTypeCollection genericParameters)
     : base(source, genericParameters)
 {
     this.name = name;
 }
Exemplo n.º 8
0
 IIndexerReferenceExpression IIntermediateIndexerSignatureMember.GetReference(IMemberParentReferenceExpression parent, IEnumerable <IExpression> parameters)
 {
     return(this.GetReference(parent, (IEnumerable <IExpression>)parameters));
 }
Exemplo n.º 9
0
 public IIndexerReferenceExpression <TIndexer, TIndexerParent> GetReference(IMemberParentReferenceExpression source, IEnumerable <IExpression> parameters)
 {
     return(new IndexerReferenceExpression <TIndexer, TIndexerParent>(((TIntermediateIndexer)(object)(this)), parameters, source));
 }
 /// <summary>
 /// Creates a new <see cref="UnboundMethodReferenceStub"/> with
 /// the <paramref name="source"/>, and <paramref name="member"/>
 /// provided.
 /// </summary>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// from which the <see cref="UnboundMethodReferenceStub"/> was sourced.</param>
 /// <param name="member">The <typeparamref name="TSignature"/>
 /// to reference.</param>
 /// <param name="signatureTypesObtainer">The <see cref="Func{TResult}"/> which obtains the signature
 /// of the <paramref name="member"/>.</param>
 public MethodReferenceStub(IMemberParentReferenceExpression source, TSignature member, Func <MethodPointerReferenceExpression <TSignatureParameter, TSignature, TParent> .SignatureTypes> signatureTypesObtainer)
     : base(source)
 {
     this.Member = member;
     this.signatureTypesObtainer = signatureTypesObtainer;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Creates a new <see cref="UnboundPropertyReferenceExpression"/> with the <paramref name="name"/>
 /// and <paramref name="source"/> provided.
 /// </summary>
 /// <param name="name">A <see cref="System.String"/> relative to the
 /// property to retrieve a reference to.</param>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// from which the <see cref="UnboundPropertyReferenceExpression"/> is to be
 /// sourced.</param>
 public UnboundPropertyReferenceExpression(string name, IMemberParentReferenceExpression source)
 {
     this.name   = name;
     this.source = source;
 }
 public IIndexerSignatureReferenceExpression <TIndexer, TIndexerParent> GetReference(IMemberParentReferenceExpression source, IEnumerable <IExpression> parameters)
 {
     return(IntermediateGateway.GetIndexerSignatureReference <TIndexer, TIndexerParent>(((TIndexer)(object)(this)), source, parameters));
 }
 public IPropertyReferenceExpression GetReference(IMemberParentReferenceExpression source = null)
 {
     return(this.GetReference(source));
 }
 IIndexerReferenceExpression IIntermediateIndexerSignatureMember.GetReference(IMemberParentReferenceExpression source, IExpression[] parameters)
 {
     return(this.GetReference(source, parameters));
 }
 public PropertyReferenceExpression(IMemberParentReferenceExpression source, TProperty member, MethodReferenceType referenceType = MethodReferenceType.VirtualMethodReference)
 {
     this.Source        = source;
     this.Member        = member;
     this.ReferenceType = referenceType;
 }
 IPropertyReferenceExpression IIntermediatePropertySignatureMember.GetReference(IMemberParentReferenceExpression source)
 {
     return(IntermediateGateway.GetPropertySignatureReference <TProperty, TPropertyParent>(((TProperty)(object)(this)), source));
 }
 /// <summary>
 /// Creates a new <see cref="UnboundMethodReferenceStub"/> with
 /// the <paramref name="source"/>
 /// provided.
 /// </summary>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// from which the <see cref="UnboundMethodReferenceStub"/> was sourced.</param>
 public MethodReferenceStubBase(IMemberParentReferenceExpression source)
 {
     this.source = source;
 }
 public EventReferenceExpression(IMemberParentReferenceExpression source, TEvent member)
 {
     this.Source = source;
     this.Member = member;
 }
 /// <summary>
 /// Creates a new <see cref="UnboundMethodReferenceStub"/> with the
 /// <paramref name="source"/>, <paramref name="member"/>, and
 /// <paramref name="genericParameters"/> provdied.
 /// </summary>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// from which the <see cref="UnboundMethodReferenceStub"/> was sourced.</param>
 /// <param name="member">The <typeparamref name="TSignature"/>
 /// to reference.</param>
 /// <param name="genericParameters">The <see cref="ITypeCollection"/>
 /// of generic parameter replacements for the signature.</param>
 /// <param name="signatureTypesObtainer">The <see cref="Func{TResult}"/> which obtains the signature
 /// of the <paramref name="member"/>.</param>
 public MethodReferenceStub(IMemberParentReferenceExpression source, TSignature member, IControlledTypeCollection genericParameters, Func <MethodPointerReferenceExpression <TSignatureParameter, TSignature, TParent> .SignatureTypes> signatureTypesObtainer)
     : base(source, genericParameters)
 {
     this.Member = member;
     this.signatureTypesObtainer = signatureTypesObtainer;
 }
Exemplo n.º 20
0
 /// <summary>
 /// Creates a new <see cref="SymbolExpression"/>
 /// with the <paramref name="symbol"/> and its
 /// <paramref name="source"/>.
 /// </summary>
 /// <param name="symbol">The <see cref="System.String"/>
 /// denoting the expression.</param>
 /// <param name="source">The <see cref="IMemberParentReferenceExpression"/>
 /// which leads to the <see cref="SymbolExpression"/>.</param>
 public SymbolExpression(string symbol, IMemberParentReferenceExpression source)
 {
     this.symbol = symbol;
     this.source = source;
 }
 public UnboundEventReferenceExpression(string name, IMemberParentReferenceExpression source)
 {
     this.Source = source;
     this.Name   = name;
 }
 IPropertyReferenceExpression IIntermediatePropertySignatureMember.GetReference(IMemberParentReferenceExpression source)
 {
     return(IntermediateGateway.GetPropertyReference(this, source));
 }
 IFieldReferenceExpression IIntermediateFieldMember.GetReference(IMemberParentReferenceExpression source)
 {
     return(((TField)(object)this).GetFieldReference <TField, TFieldParent>(source));
 }
Exemplo n.º 24
0
 internal Symbol(string symbol, IMemberParentReferenceExpression source)
     : base(symbol, source)
 {
 }
Exemplo n.º 25
0
 public IndexerSignatureReferenceExpression(TIndexer member, IEnumerable <IExpression> parameters, IMemberParentReferenceExpression source, MethodReferenceType referenceType = MethodReferenceType.VirtualMethodReference, IndexerReferenceType indexerType = IndexerReferenceType.InferredIndexer)
     : base()
 {
     this.Source        = source;
     this.Member        = member;
     this.Parameters    = new MalleableExpressionCollection(parameters);
     this.ReferenceType = referenceType;
 }
Exemplo n.º 26
0
 public IIndexerReferenceExpression <TIndexer, TIndexerParent> GetReference(IMemberParentReferenceExpression parent, params IExpression[] parameters)
 {
     return(this.GetReference(parent, (IEnumerable <IExpression>)parameters));
 }