Example #1
0
 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);
 }
Example #2
0
 internal Submission(
     CommonSubmission previous,
     NamedTypeSymbol scriptClass,
     Imports imports,
     Delegate factory) 
     : base(previous, factory)
 {
     Debug.Assert(imports != null);
     this.scriptClass = scriptClass;
     this.imports = imports;
 }
Example #3
0
        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));
        }
Example #4
0
 internal Submission(
     CommonSubmission previous,
     NamedTypeSymbol scriptClass,
     Imports imports,
     Delegate factory)
     : base(previous, factory)
 {
     Debug.Assert(imports != null);
     this.scriptClass = scriptClass;
     this.imports     = imports;
 }
Example #5
0
 public ChainedCompilationsBinderFactory(CommonSubmission previousInteraction, bool hasHostObject)
 {
     this.previousInteraction = previousInteraction;
     this.hasHostObject       = hasHostObject;
 }
 public ChainedCompilationsBinderFactory(CommonSubmission previousInteraction, bool hasHostObject)
 {
     this.previousInteraction = previousInteraction;
     this.hasHostObject = hasHostObject;
 }