예제 #1
0
        private void AppendAssemblySetup(StringBuilder sb, ISessionContext sessionContext)
        {
            sb.AppendLine("    var assemblyRegistry = new " + typeof(AssemblyRegistry).FullName + "( new System.Reflection.Assembly[] {");
            var asses  = sessionContext.GetAllAssemblies().Select(x => "typeof(" + x.GetTypes().First().FullName + ").Assembly");
            var joined = string.Join(",\r\n        ", asses.ToArray());

            sb.AppendLine(joined);

            sb.AppendLine("    });");

            sb.AppendLine("   var eh = new StorEvil.Interpreter.ExtensionMethodHandler(assemblyRegistry);");
            sb.AppendLine("   // _sessionContext = new SessionContext();");
        }
예제 #2
0
        private void AppendAssemblySetup(StringBuilder sb, ISessionContext sessionContext)
        {
            sb.AppendLine("    var assemblyRegistry = new " + typeof(AssemblyRegistry).FullName +"( new System.Reflection.Assembly[] {");
            var asses = sessionContext.GetAllAssemblies().Select(x=> "typeof(" + x.GetTypes().First().FullName + ").Assembly");
            var joined = string.Join(",\r\n        ", asses.ToArray());

            sb.AppendLine(joined);

            sb.AppendLine("    });");

            sb.AppendLine("   var eh = new StorEvil.Interpreter.ExtensionMethodHandler(assemblyRegistry);");
            sb.AppendLine("   // _sessionContext = new SessionContext();");
        }