internal static Submission FromCompilation( Type delegateType, Compilation compilation, ReflectionEmitResult emitResult, CommonSubmission previousInteraction) { Imports imports = ((SourceNamespaceSymbol)compilation.SourceModule.GlobalNamespace).GetBoundImports().SingleOrDefault() ?? Imports.Empty; var factory = (emitResult != null) ? Delegate.CreateDelegate(delegateType, emitResult.EntryPoint) : null; return new Submission(previousInteraction, compilation.ScriptClass, imports, factory); }
internal Submission( CommonSubmission previous, NamedTypeSymbol scriptClass, Imports imports, Delegate factory) : base(previous, factory) { Debug.Assert(imports != null); this.scriptClass = scriptClass; this.imports = imports; }
internal static Submission FromCompilation( Type delegateType, Compilation compilation, ReflectionEmitResult emitResult, CommonSubmission previousInteraction) { Imports imports = ((SourceNamespaceSymbol)compilation.SourceModule.GlobalNamespace).GetBoundImports().SingleOrDefault() ?? Imports.Empty; var factory = (emitResult != null) ? Delegate.CreateDelegate(delegateType, emitResult.EntryPoint) : null; return(new Submission(previousInteraction, compilation.ScriptClass, imports, factory)); }
public ChainedCompilationsBinderFactory(CommonSubmission previousInteraction, bool hasHostObject) { this.previousInteraction = previousInteraction; this.hasHostObject = hasHostObject; }