public RunInteractive(ISteamSessionFactory steamSessionFactory, IServiceMessenger messenger)
     : base(steamSessionFactory) {
     IsCommand("interactive", "Run in interactive mode");
     HasOption("b|bind=", "The address to listen on", s => Bind = s);
     _steamSessionFactory = steamSessionFactory;
     _messenger = messenger;
 }
 protected BaseSteamCommand(ISteamSessionFactory factory)
 {
     _factory = factory;
     _app     = SystemExtensions.CreateLazy(() => new App(AppId));
     HasRequiredOption <uint>("a|appid=", "AppID", s => AppId  = s);
     HasFlag("v|verbose", "Verbose", f => Common.Flags.Verbose = f);
 }
Exemple #3
0
 public RunInteractive(ISteamSessionFactory steamSessionFactory, IServiceMessenger messenger)
     : base(steamSessionFactory)
 {
     IsCommand("interactive", "Run in interactive mode");
     HasOption("b|bind=", "The address to listen on", s => Bind = s);
     _steamSessionFactory = steamSessionFactory;
     _messenger           = messenger;
 }
        public InstallCommand(ISteamSessionFactory factory, ISteamDownloader steamDownloader, ISteamApi steamApi)
            : base(factory) {
            _steamDownloader = steamDownloader;
            _steamApi = steamApi;

            IsCommand("install", "Install desired Steam PublishedFile(s) for the specified appid");
            HasFlag("f|force", "Force resubscription", f => Force = f);
            AllowsAnyAdditionalArguments("<publishedfileid> [<publishedfileid2> ...]");
        }
 public static Task <T> PerformArmaSteamAction <T>(Func <ISteamApi, Task <T> > action, uint appId,
                                                   ISteamSessionFactory steamSessionFactory)
 => steamSessionFactory.Do(appId, SteamHelper.Create().SteamPath, async s => {
     var steamApi = new SteamApi(s);
     await
     steamApi.Initialize(SteamHelper.Create().TryGetSteamAppById(appId).AppPath, appId)
     .ConfigureAwait(false);
     return(steamApi);
 }, SteamAPI.RunCallbacks /* wrap.Simulate */, action);
        public InstallCommand(ISteamSessionFactory factory, ISteamDownloader steamDownloader, ISteamApi steamApi)
            : base(factory)
        {
            _steamDownloader = steamDownloader;
            _steamApi        = steamApi;

            IsCommand("install", "Install desired Steam PublishedFile(s) for the specified appid");
            HasFlag("f|force", "Force resubscription", f => Force = f);
            AllowsAnyAdditionalArguments("<publishedfileid> [<publishedfileid2> ...]");
        }
 public UninstallCommand(ISteamSessionFactory factory, ISteamApi steamApi) : base(factory) {
     _steamApi = steamApi;
     IsCommand("uninstall", "Uninstall desired Steam PublishedFile(s) for the specified appid");
     AllowsAnyAdditionalArguments("<publishedfileid> [<publishedfileid2> ...]");
 }
 public static Task PerformArmaSteamAction(Func <ISteamApi, Task> action, uint appId,
                                           ISteamSessionFactory steamSessionFactory)
 => PerformArmaSteamAction(x => action(x).Void(), appId, steamSessionFactory);
 public UninstallCommand(ISteamSessionFactory factory, ISteamApi steamApi) : base(factory)
 {
     _steamApi = steamApi;
     IsCommand("uninstall", "Uninstall desired Steam PublishedFile(s) for the specified appid");
     AllowsAnyAdditionalArguments("<publishedfileid> [<publishedfileid2> ...]");
 }