예제 #1
0
파일: Startup.cs 프로젝트: Microsoft/RTVS
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            LifetimeManager lifetimeManager,
            InterpreterManager interpreterManager,
            SecurityManager securityManager
        ) {
            lifetimeManager.Initialize();
            interpreterManager.Initialize();

            app.UseWebSockets(new WebSocketOptions {
                ReplaceFeature = true,
                KeepAliveInterval = TimeSpan.FromMilliseconds(1000000000),
                ReceiveBufferSize = 0x10000
            });

            var routeBuilder = new RouteBuilder(app, new RouteHandler(RemoteUriHelper.HandlerAsync));
            routeBuilder.MapRoute("help_and_shiny", "remoteuri");
            app.UseRouter(routeBuilder.Build());

            app.UseBasicAuthentication(options => {
                options.Events = new BasicEvents { OnSignIn = securityManager.SignInAsync };
            });

            app.Use((context, next) => {
                if (!context.User.Identity.IsAuthenticated) {
                    return context.Authentication.ChallengeAsync();
                } else {
                    return next();
                }
            });

            app.UseMvc();
        }
예제 #2
0
 public Interpreter(InterpreterManager manager, string id, string path, string binPath, Version version)
 {
     Manager = manager;
     Id      = id;
     Path    = path;
     BinPath = binPath;
     Version = version;
 }
예제 #3
0
 public Interpreter(InterpreterManager manager, string id, string name, string path, string binPath, Version version) {
     Manager = manager;
     Id = id;
     Name = name;
     Path = path;
     BinPath = binPath;
     Version = version;
 }
예제 #4
0
 public Interpreter(InterpreterManager manager, string id, string name, IRInterpreterInfo rInterpreterInfo)
 {
     Manager          = manager;
     Id               = id;
     Name             = name;
     Path             = rInterpreterInfo.InstallPath;
     BinPath          = rInterpreterInfo.BinPath;
     Version          = rInterpreterInfo.Version;
     RInterpreterInfo = rInterpreterInfo;
 }
예제 #5
0
        public SessionManager(
            InterpreterManager interpManager,
            IOptions<LoggingOptions> loggingOptions,
            ILogger<Session> sessionLogger,
            ILogger<MessagePipe> messageLogger,
            ILogger<Process> hostOutputLogger
        ) {
            _interpManager = interpManager;
            _loggingOptions = loggingOptions.Value;
            _sessionLogger = sessionLogger;

            if (_loggingOptions.LogPackets) {
                _messageLogger = messageLogger;
            }

            if (_loggingOptions.LogHostOutput) {
                _hostOutputLogger = hostOutputLogger;
            }
        }
 public InterpretersController(InterpreterManager interpManager)
 {
     _interpManager = interpManager;
 }
예제 #7
0
 public InterpretersController(InterpreterManager interpManager) {
     _interpManager = interpManager;
 }
예제 #8
0
 public SessionsController(InterpreterManager interpManager, SessionManager sessionManager) {
     _interpManager = interpManager;
     _sessionManager = sessionManager;
 }