public InstanceCreatorOptions(IUnitReflector reflector, ILocalVariableBindings locals, ITypeReference type, params ITypeReference[] constructorParameters) { this.type = type; this.locals = locals; this.reflector = reflector; this.constructorParameters = constructorParameters; }
public SpecifiedMethodCallRegistrar(IMetadataHost host, ILogger log, ReplacementRegistry registry) { this.host = host; this.log = log; this.registry = registry; reflector = new UnitReflector(host); }
public AnonymousMethodBodyBuilder(IMetadataHost host, IUnitReflector reflector, ITypeReference delegateType, Type returnType, ParameterInfo[] parameters) { this.host = host; this.reflector = reflector; this.delegateType = delegateType; this.returnTypeReference = reflector.Get(returnType); foreach (var parameter in parameters) { var parameterDefinition = new ParameterDefinition(); parameterDefinition.Index = (ushort)parameter.Position; parameterDefinition.Type = reflector.Get(parameter.ParameterType); parameterDefinition.Name = host.NameTable.GetNameFor("altered" + parameter.Name); parameterDefinition.ContainingSignature = method; method.Parameters.Add(parameterDefinition); } }
public AnonymousMethodBodyBuilder(IMetadataHost host, IUnitReflector reflector, ITypeReference delegateType, ITypeReference returnType, KeyValuePair<string, ITypeReference>[] parameterTypes) { this.host = host; this.reflector = reflector; this.delegateType = delegateType; this.returnTypeReference = returnType; for (var pIndex = 0; pIndex < parameterTypes.Length; pIndex++) { var parameterType = parameterTypes[pIndex]; var parameterDefinition = new ParameterDefinition(); parameterDefinition.Index = (ushort) pIndex; parameterDefinition.Type = parameterType.Value; parameterDefinition.Name = host.NameTable.GetNameFor("altered" + parameterType.Key); parameterDefinition.ContainingSignature = method; method.Parameters.Add(parameterDefinition); } }
public MethodBodyBuilder(IMetadataHost host, IEnumerable<IParameterDefinition> parameters) { reflector = new UnitReflector(host); locals = new LocalVariableBindings(reflector); define = new DefinitionBuilder(reflector, locals, host.NameTable); create = new InstanceCreator(reflector, locals); declare = new DeclarationBuilder(define); call = new MethodCallBuilder(host, reflector, locals); changeType = new Converter(reflector); operators = new TypeOperatorBuilder(reflector); constant = new CompileTimeConstantBuilder(reflector); @if = new IfStatementBuilder(); @return = new CodeReturnStatementBuilder(); anonymousMethod = new AnonymousMethodTypeOptions(host, reflector); statement = new StatementBuilder(); @params = new ParameterBindings(); foreach (var parameter in parameters) { @params.AddBinding(parameter); } }
public StaticMethodCallReplacer(IMetadataHost host, ILogger log, ReplacementRegistry registry) { this.log = log; this.registry = registry; reflector = new UnitReflector(host); }
public TypeOperatorBuilder(IUnitReflector reflector) { this.reflector = reflector; }
public Converter(IUnitReflector reflector) { this.reflector = reflector; }