Exemplo n.º 1
0
 public ChatProcessor(
     IChatContext context,
     IContainerInterface containerInt,
     IServerStore serverStore,
     IIpGetter ipGetter,
     IChatAllowList allowList)
 {
     _context            = context;
     _containerInterface = containerInt;
     _serverStore        = serverStore;
     _ipGetter           = ipGetter;
     _allowList          = allowList;
 }
Exemplo n.º 2
0
        public DockerInterface(ILogger <DockerInterface> logger, IOptions <SteamLoginOptions> steamLoginOptions, IIpGetter ipGetter, IServerFileStore fileStore)
        {
            _logger            = logger;
            _steamLoginOptions = steamLoginOptions.Value;
            _ipGetter          = ipGetter;
            _fileStore         = fileStore;
            var os = Environment.OSVersion;

            if (os.Platform == PlatformID.Unix)
            {
                _client = new DockerClientConfiguration(
                    new Uri("unix:///var/run/docker.sock"))
                          .CreateClient();
            }
            else if (os.Platform == PlatformID.Win32NT)
            {
                _client = new DockerClientConfiguration(
                    new Uri("npipe://./pipe/docker_engine"))
                          .CreateClient();
            }
        }