Example #1
0
 /// <summary>
 /// Provides copy of a method body, a statement, or an expression, in which the references to the nodes
 /// inside a cone is replaced. The cone is defined using the parent class. 
 /// </summary>
 public CodeCopier(IMetadataHost host, ISourceLocationProvider/*?*/ sourceLocationProvider)
     : base(host)
 {
     this.sourceLocationProvider = sourceLocationProvider;
       this.createMutableType = new CreateMutableType(this);
 }
Example #2
0
 /// <summary>
 /// Provides copy of a method body, a statement, or an expression, in which the references to the nodes
 /// inside a cone is replaced. The cone is defined using the parent class. 
 /// </summary>
 public CodeCopier(IMetadataHost host, ISourceLocationProvider/*?*/ sourceLocationProvider, IDefinition rootOfCone, out List<INamedTypeDefinition> newTypes)
     : base(host, rootOfCone, out newTypes)
 {
     this.sourceLocationProvider = sourceLocationProvider;
       this.createMutableType = new CreateMutableType(this);
 }
Example #3
0
 /// <summary>
 /// Allocates a mutator that uses the inherited methods from MetadataMutatingVisitor to walk everything down to the method body level,
 /// then takes over and define Visit methods for all of the structures in the code model that pertain to method bodies.
 /// </summary>
 /// <param name="host">An object representing the application that is hosting this mutator. It is used to obtain access to some global
 /// objects and services such as the shared name table and the table for interning references.</param>
 public CodeMutatingVisitor(IMetadataHost host)
     : base(host)
 {
     createMutableType = new CreateMutableType(this);
 }
Example #4
0
 /// <summary>
 /// Allocates a mutator that uses the inherited methods from MetadataMutator to walk everything down to the method body level,
 /// then takes over and define Visit methods for all of the structures in the code model that pertain to method bodies.
 /// </summary>
 /// <param name="host">An object representing the application that is hosting this mutator. It is used to obtain access to some global
 /// objects and services such as the shared name table and the table for interning references.</param>
 /// <param name="copyOnlyIfNotAlreadyMutable"></param>
 /// <param name="sourceLocationProvider">An object that can map the ILocation objects found in a block of statements to IPrimarySourceLocation objects. May be null.</param>
 public CodeMutator(IMetadataHost host, bool copyOnlyIfNotAlreadyMutable, ISourceLocationProvider/*?*/ sourceLocationProvider)
     : base(host, copyOnlyIfNotAlreadyMutable)
 {
     this.sourceLocationProvider = sourceLocationProvider;
       createMutableType = new CreateMutableType(this, !copyOnlyIfNotAlreadyMutable);
 }
Example #5
0
 /// <summary>
 /// Allocates a mutator that uses the inherited methods from MetadataMutator to walk everything down to the method body level,
 /// then takes over and define Visit methods for all of the structures in the code model that pertain to method bodies.
 /// </summary>
 /// <param name="host">An object representing the application that is hosting this mutator. It is used to obtain access to some global
 /// objects and services such as the shared name table and the table for interning references.</param>
 /// <param name="sourceLocationProvider">An object that can map the ILocation objects found in a block of statements to IPrimarySourceLocation objects. May be null.</param>
 public CodeMutator(IMetadataHost host, ISourceLocationProvider/*?*/ sourceLocationProvider)
     : base(host)
 {
     this.sourceLocationProvider = sourceLocationProvider;
       createMutableType = new CreateMutableType(this, true);
 }
Example #6
0
 /// <summary>
 /// Allocates a mutator that uses the inherited methods from MetadataMutator to walk everything down to the method body level,
 /// then takes over and define Visit methods for all of the structures in the code model that pertain to method bodies.
 /// </summary>
 /// <param name="host">An object representing the application that is hosting this mutator. It is used to obtain access to some global
 /// objects and services such as the shared name table and the table for interning references.</param>
 /// <param name="copyOnlyIfNotAlreadyMutable">True if the mutator should try and perform mutations in place, rather than mutating new copies.</param>
 public CodeMutator(IMetadataHost host, bool copyOnlyIfNotAlreadyMutable)
     : base(host, copyOnlyIfNotAlreadyMutable)
 {
     createMutableType = new CreateMutableType(this, !copyOnlyIfNotAlreadyMutable);
 }
Example #7
0
 /// <summary>
 /// Allocates a mutator that uses the inherited methods from MetadataMutator to walk everything down to the method body level,
 /// then takes over and define Visit methods for all of the structures in the code model that pertain to method bodies.
 /// </summary>
 /// <param name="host">An object representing the application that is hosting this mutator. It is used to obtain access to some global
 /// objects and services such as the shared name table and the table for interning references.</param>
 public CodeMutator(IMetadataHost host)
     : base(host)
 {
     createMutableType = new CreateMutableType(this, true);
 }