/// <summary> /// Allows an <see cref="PropertyInfoElement"/> to be visited. /// This method is called when the element accepts this visitor /// instance. /// </summary> /// <param name="propertyInfoElement"> /// The <see cref="PropertyInfoElement"/> being visited. /// </param> /// <returns> /// A <see cref="IReflectionVisitor{T}" /> instance which can be used /// to continue the visiting process with potentially updated /// observations. /// </returns> /// <remarks> /// <para> /// This implementation relays the two <see cref="MethodInfoElement"/> instances /// from the getter and setter of the <see cref="PropertyInfoElement"/> parameter, /// to <see cref="Visit(MethodInfoElement)"/>, /// but since the method is virtual, child classes can override it. /// </para> /// </remarks> public virtual IReflectionVisitor <T> Visit( PropertyInfoElement propertyInfoElement) { if (propertyInfoElement == null) { throw new ArgumentNullException("propertyInfoElement"); } var getMethodInfoElement = propertyInfoElement.GetGetMethodInfoElement(); var setMethodInfoElement = propertyInfoElement.GetSetMethodInfoElement(); IReflectionVisitor <T> visitor = this; if (getMethodInfoElement != null) { visitor = visitor.Visit(getMethodInfoElement); } if (setMethodInfoElement != null) { visitor = visitor.Visit(setMethodInfoElement); } return(visitor); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitModuleDefinition(this); this.Types.Accept(visitor); this.TypeReferences.Accept(visitor); }
internal VisitorEqualityComparer( IReflectionVisitor <IEnumerable <T> > visitor, IEqualityComparer <T> comparer) { this.visitor = visitor; this.comparer = comparer; }
internal ReflectionVisitorElementComparer( IReflectionVisitor <IEnumerable <T> > visitor, IEqualityComparer <T> comparer = null) { this.visitor = visitor; this.comparer = comparer ?? EqualityComparer <T> .Default; }
/// <summary> /// Accepts the provided <see cref="IReflectionVisitor{T}"/>, by calling the /// appropriate strongly-typed <see cref="IReflectionVisitor{T}.Visit(PropertyInfoElement)"/> /// method on the visitor. /// </summary> /// <typeparam name="T">The type of observation or result which the /// <see cref="IReflectionVisitor{T}"/> instance produces when visiting nodes.</typeparam> /// <param name="visitor">The <see cref="IReflectionVisitor{T}"/> instance.</param> /// <returns>A (potentially) new <see cref="IReflectionVisitor{T}"/> instance which can be /// used to continue the visiting process with potentially updated observations.</returns> public IReflectionVisitor <T> Accept <T>(IReflectionVisitor <T> visitor) { if (visitor == null) { throw new ArgumentNullException("visitor"); } return(visitor.Visit(this)); }
public override void Accept (IReflectionVisitor visitor) { visitor.VisitFieldDefinition (this); if (this.MarshalInfo != null) this.MarshalInfo.Accept (visitor); visitor.VisitCustomAttributeCollection(this.CustomAttributes); }
/// <summary> /// Accepts the <see cref="IReflectionVisitor{T}"/> visitor on each of the /// <paramref name="elements"/> in the sequence. /// </summary> /// <typeparam name="T"> /// The type of observation or result which the <see cref="IReflectionVisitor{T}"/> /// instance produces when visiting nodes. /// </typeparam> /// <param name="elements"> /// The sequence of <see cref="IReflectionElement"/> instances upon which /// the <see cref="IReflectionElement.Accept{T}"/> method will be called. /// </param> /// <param name="visitor">The <see cref="IReflectionVisitor{T}"/> instance.</param> /// <returns> /// A (potentially) new <see cref="IReflectionVisitor{T}"/> instance which can be /// used to continue the visiting process with potentially updated observations. /// </returns> public static IReflectionVisitor <T> Accept <T>( this IEnumerable <IReflectionElement> elements, IReflectionVisitor <T> visitor) { if (elements == null) { throw new ArgumentNullException("elements"); } return(new CompositeReflectionElement(elements.ToArray()).Accept(visitor)); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitParameterDefinition(this); if (this.MarshalInfo != null) { this.MarshalInfo.Accept(visitor); } visitor.VisitCustomAttributeCollection(this.CustomAttributes); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitParameterDefinition(this); if (this.MarshalSpec != null) { this.MarshalSpec.Accept(visitor); } this.CustomAttributes.Accept(visitor); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitFieldDefinition(this); if (this.MarshalSpec != null) { this.MarshalSpec.Accept(visitor); } this.CustomAttributes.Accept(visitor); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitMethodDefinition(this); visitor.VisitGenericParameterCollection(this.GenericParameters); visitor.VisitParameterDefinitionCollection(this.Parameters); if (this.PInvokeInfo != null) this.PInvokeInfo.Accept(visitor); visitor.VisitSecurityDeclarationCollection(this.SecurityDeclarations); visitor.VisitOverrideCollection(this.Overrides); visitor.VisitCustomAttributeCollection(this.CustomAttributes); }
/// <summary> /// Allows an <see cref="EventInfoElement"/> to be visited. This method /// is called when the element accepts this visitor instance. /// </summary> /// <param name="eventInfoElement"> /// The <see cref="EventInfoElement"/> being visited. /// </param> /// <returns> /// A <see cref="IReflectionVisitor{T}" /> instance which can be used /// to continue the visiting process with potentially updated /// observations. /// </returns> /// <remarks> /// <para> /// This implementation simply returns /// <paramref name="eventInfoElement" /> without doing anything, but /// since the method is virtual, child classes can override it. /// </para> /// </remarks> public virtual IReflectionVisitor <T> Visit( EventInfoElement eventInfoElement) { if (eventInfoElement == null) { throw new ArgumentNullException("eventInfoElement"); } IReflectionVisitor <T> visitor = this; visitor = visitor.Visit(eventInfoElement.GetAddMethodInfoElement()); visitor = visitor.Visit(eventInfoElement.GetRemoveMethodInfoElement()); return(visitor); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitTypeDefinition(this); visitor.VisitGenericParameterCollection(this.GenericParameters); visitor.VisitInterfaceCollection(this.Interfaces); visitor.VisitConstructorCollection(this.Constructors); visitor.VisitMethodDefinitionCollection(this.StrictMethods); visitor.VisitFieldDefinitionCollection(this.Fields); visitor.VisitPropertyDefinitionCollection(this.Properties); visitor.VisitEventDefinitionCollection(this.Events); visitor.VisitNestedTypeCollection(this.NestedTypes); visitor.VisitCustomAttributeCollection(this.CustomAttributes); visitor.VisitSecurityDeclarationCollection(this.SecurityDeclarations); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitMethodDefinition(this); visitor.VisitGenericParameterCollection(this.GenericParameters); visitor.VisitParameterDefinitionCollection(this.Parameters); if (this.PInvokeInfo != null) { this.PInvokeInfo.Accept(visitor); } visitor.VisitSecurityDeclarationCollection(this.SecurityDeclarations); visitor.VisitOverrideCollection(this.Overrides); visitor.VisitCustomAttributeCollection(this.CustomAttributes); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitTypeDefinition(this); this.GenericParameters.Accept(visitor); this.Interfaces.Accept(visitor); this.Constructors.Accept(visitor); this.Methods.Accept(visitor); this.Fields.Accept(visitor); this.Properties.Accept(visitor); this.Events.Accept(visitor); this.NestedTypes.Accept(visitor); this.CustomAttributes.Accept(visitor); this.SecurityDeclarations.Accept(visitor); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitTypeDefinition (this); this.GenericParameters.Accept (visitor); this.Interfaces.Accept (visitor); this.Constructors.Accept (visitor); this.Methods.Accept (visitor); this.Fields.Accept (visitor); this.Properties.Accept (visitor); this.Events.Accept (visitor); this.NestedTypes.Accept (visitor); this.CustomAttributes.Accept (visitor); this.SecurityDeclarations.Accept (visitor); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitEventDefinition (this); this.CustomAttributes.Accept (visitor); }
public void Accept (IReflectionVisitor visitor) { visitor.VisitModuleDefinition (this); visitor.VisitTypeDefinitionCollection(this.Types); //visitor.VisitTypeReferenceCollection(this.TypeReferences); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitPropertyDefinition(this); this.CustomAttributes.Accept(visitor); }
public void Accept (IReflectionVisitor visitor) { visitor.VisitExternTypeCollection (this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitOverrideCollection(this); }
public override void Accept (IReflectionVisitor visitor) { visitor.VisitMethodReference (this); visitor.VisitGenericParameterCollection(this.GenericParameters); visitor.VisitParameterDefinitionCollection(this.Parameters); }
public abstract void Accept(IReflectionVisitor visitor);
public override void Accept(IReflectionVisitor visitor) { visitor.VisitEventDefinition(this); this.CustomAttributes.Accept(visitor); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitNestedTypeCollection(this); }
public void Accept (IReflectionVisitor visitor) { visitor.VisitInterfaceCollection (this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitCustomAttributeCollection (this); }
public virtual void Accept(IReflectionVisitor visitor) { }
public void Accept(IReflectionVisitor visitor) { visitor.VisitMethodDefinitionCollection(this); }
public void Accept(IReflectionVisitor visitor) { throw new NotImplementedException(); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitPInvokeInfo (this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitPropertyDefinitionCollection (this); }
public virtual void Accept(IReflectionVisitor visitor) { visitor.VisitMarshalSpec (this); }
public void Accept (IReflectionVisitor visitor) { visitor.VisitGenericParameterCollection (this); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitEventDefinition(this); visitor.VisitCustomAttributeCollection(this.CustomAttributes); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitModuleDefinition (this); this.Types.Accept (visitor); this.TypeReferences.Accept (visitor); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitExternTypeCollection(this); }
public virtual void Accept(IReflectionVisitor visitor) { visitor.VisitTypeReference (this); }
public abstract void Accept (IReflectionVisitor visitor);
public void Accept(IReflectionVisitor visitor) { visitor.VisitInterfaceCollection(this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitMemberReferenceCollection(this); }
public ForwardingGenericVisitor(IReflectionVisitor visitor) { this.visitor = visitor; }
public void Accept(IReflectionVisitor visitor) { visitor.VisitSecurityDeclaration(this); }
public SemanticElementComparer( IReflectionVisitor <IEnumerable> visitor) { this.visitor = visitor; }
public override void Accept (IReflectionVisitor visitor) { visitor.VisitTypeReference (this); }
public override void Accept (IReflectionVisitor visitor) { visitor.VisitPropertyDefinition (this); this.CustomAttributes.Accept (visitor); }
public void Accept (IReflectionVisitor visitor) { visitor.VisitSecurityDeclaration (this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitOverrideCollection (this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitGenericParameterCollection(this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitNestedTypeCollection (this); }
public override void Accept(IReflectionVisitor visitor) { visitor.VisitParameterDefinition (this); if (this.MarshalSpec != null) this.MarshalSpec.Accept (visitor); this.CustomAttributes.Accept (visitor); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitPropertyDefinitionCollection(this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitConstructorCollection (this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitFieldDefinitionCollection (this); }
/// <summary> /// Accepts the <see cref="IReflectionVisitor{T}" /> as per the /// Visitor pattern http://en.wikipedia.org/wiki/Visitor_pattern. /// </summary> /// <typeparam name="T"> /// The type of observation(s) the visitor might collect. /// </typeparam> /// <param name="visitor">The visitor to accept.</param> /// <returns><paramref name="visitor" /></returns> /// <remarks> /// <para> /// While <strong>NullReflection</strong> partakes in a Visitor /// hierarchy, this particular implementation follows the Null Object /// pattern, by doing nothing. The way it does nothing is by returning /// <paramref name="visitor" />. /// </para> /// </remarks> public IReflectionVisitor <T> Accept <T>(IReflectionVisitor <T> visitor) { return(visitor); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitParameterDefinitionCollection (this); }
public void Accept(IReflectionVisitor visitor) { visitor.VisitCustomAttributeCollection(this); }
public void Accept (IReflectionVisitor visitor) { visitor.VisitMemberReferenceCollection (this); }