public async Task Initialize(IAbsoluteDirectoryPath gamePath, uint appId) { var r = await _steamApi.Do(x => { var managerConfigWrap = new ManagerConfigWrap {ConsumerAppId = appId}; managerConfigWrap.Load(gamePath.GetChildFileWithName(@"Launcher\config.bin").ToString()); return x.Init(managerConfigWrap); }).ConfigureAwait(false); if (r == InitResult.SteamNotRunning) throw new SteamInitializationException( "Steam initialization failed. Is Steam running under the same priviledges?"); if (r == InitResult.APIInitFailed) throw new SteamInitializationException( "Steam initialization failed. Is Steam running under the same priviledges?"); if (r == InitResult.ContextCreationFailed) throw new SteamInitializationException( "Steam initialization failed. Is Steam running under the same priviledges?"); if (r == InitResult.AlreadyInitialized) throw new SteamInitializationException( "Steam initialization failed. Already initialized"); if (r == InitResult.Disabled) throw new SteamInitializationException( "Steam initialization failed. Disabled"); }
public async Task Initialize(IAbsoluteDirectoryPath gamePath, uint appId) { var r = await _steamApi.Do(x => { var managerConfigWrap = new ManagerConfigWrap { ConsumerAppId = appId }; managerConfigWrap.Load(gamePath.GetChildFileWithName(@"Launcher\config.bin").ToString()); return(x.Init(managerConfigWrap)); }).ConfigureAwait(false); if (r == InitResult.SteamNotRunning) { throw new SteamInitializationException( "Steam initialization failed. Is Steam running under the same priviledges?"); } if (r == InitResult.APIInitFailed) { throw new SteamInitializationException( "Steam initialization failed. Is Steam running under the same priviledges?"); } if (r == InitResult.ContextCreationFailed) { throw new SteamInitializationException( "Steam initialization failed. Is Steam running under the same priviledges?"); } if (r == InitResult.AlreadyInitialized) { throw new SteamInitializationException( "Steam initialization failed. Already initialized"); } if (r == InitResult.Disabled) { throw new SteamInitializationException( "Steam initialization failed. Disabled"); } }