AK.F1.Timing.Utility.Recorder.Program.Live C# (CSharp) Méthode

Live() public méthode

Reads and records the live-timing message stream.
/// Thrown when , or /// is . /// /// Thrown when , or /// is empty. ///
public Live ( string username, string password, string session ) : void
username string A valid www.formula1.com username.
password string The corresponding password.
session string The name of the session to record. Can contain path information.
Résultat void
        public void Live(string username, string password, string session)
        {
            Guard.NotNullOrEmpty(username, "username");
            Guard.NotNullOrEmpty(password, "password");
            Guard.NotNullOrEmpty(session, "session");

            string path;
            if(MakeRecordPath(session, out path))
            {
                DoIOBoundOperation(() =>
                {
                    AuthenticationToken token;
                    if(TryAuthenticate(username, password, out token))
                    {
                        Read(F1Timing.Live.ReadAndRecord(token, path));
                    }
                });
            }
        }