Exemplo n.º 1
0
    public static async Task <Ticket?> Get(ISteam steam)
    {
        var ticketBytes = await steam.GetAuthSessionTicketAsync().ConfigureAwait(true);

        if (ticketBytes == null)
        {
            return(null);
        }

        return(EncryptAuthSessionTicket(ticketBytes, steam.GetServerRealTime()));
    }
Exemplo n.º 2
0
 public SteamHelper(ISteam steam)
 {
     this._initialized                  = steam.IsAvailable;
     this._steam                        = steam;
     this._steam.UserStatsStored       += new UserStatsStoredEventHandler(this.UserStatsStoredEventHandler);
     this._steam.UserStatsReceived     += new UserStatsReceivedEventHandler(this.UserStatsReceivedEventHandler);
     this._steam.UserAchievementStored += new UserAchievementStoredEventHandler(this.UserAchievementStoredEventHandler);
     this._steam.GlobalStatsReceived   += new GlobalStatsReceivedEventHandler(this.GlobalStatsReceivedEventHandler);
     if (!this._initialized)
     {
         return;
     }
     this._appID = this._steam.GetGameID();
     this.RequestStats();
 }
Exemplo n.º 3
0
 // If we want to stream a music file, we can't
 public StreamProgressInfo(ISteam file)
 {
     this.BytesSent = file.BytesSent;
     this.Length    = file.Length;
 }