/// <summary>
 /// Constructs a TCAPI object with no asynchronous support.
 /// </summary>
 /// <param name="endpoint">The endpoint for the TCAPI</param>
 /// <param name="authentification">The authentification object</param>
 public TCAPI(Uri endpoint, IAuthenticationConfiguration authentification)
 {
     this.endpoint = endpoint;
     this.Authentification = authentification;
     this.tcapiCallback = null;
     this.offlineStorage = null;
     this.version = DetermineVersioning();
 }
 public TCAPI(Uri endpoint, IAuthenticationConfiguration authentification, ITCAPICallback tcapiCallback, IOfflineStorage offlineStorage, int statementPostInterval, int maxBatchSize, TCAPIVersion version)
     : this(endpoint, authentification, tcapiCallback, offlineStorage, statementPostInterval, maxBatchSize)
 {
     this.version = version;
 }
        /// <summary>
        /// Construct a TCAPI object with asynchronous support.
        /// </summary>
        /// <param name="endpoint">The LRS endpoint</param>
        /// <param name="authentification">Authentification object</param>
        /// <param name="tcapiCallback">Asynchornous callback object</param>
        /// <param name="offlineStorage">Offline Storage object</param>
        /// <param name="statementPostInterval">Interval for asynchronous operations to take place, in milliseconds</param>
        public TCAPI(Uri endpoint, IAuthenticationConfiguration authentification, ITCAPICallback tcapiCallback, IOfflineStorage offlineStorage, int statementPostInterval, int maxBatchSize)
        {
            this.endpoint = endpoint;
            this.authentification = authentification;
            this.tcapiCallback = tcapiCallback;
            this.offlineStorage = offlineStorage;
            this.statementPostInterval = statementPostInterval;
            this.maxBatchSize = maxBatchSize;

            this.asyncPostCallback = new AsyncPostCallback(this.PostSuccess, this.PostFailed, this.PostConnectionFailed);
            this.isAsyncFlushing = false;

            asyncPostTimer = new Timer();
            asyncPostTimer.Elapsed += new ElapsedEventHandler(AsyncPostTimerElapsed);
            asyncPostTimer.Interval = this.statementPostInterval;
            asyncPostTimer.Enabled = this.statementPostInterval > 0;
            asyncPostTimer.AutoReset = true;
            this.version = DetermineVersioning();
        }
 /// <summary>
 /// Construct a TCAPI object with asynchronous support and a default maxBatchSize of 10.
 /// </summary>
 /// <param name="endpoint">The LRS endpoint</param>
 /// <param name="authentification">Authentification object</param>
 /// <param name="tcapiCallback">Asynchornous callback object</param>
 /// <param name="offlineStorage">Offline Storage object</param>
 /// <param name="statementPostInterval">Interval for asynchronous operations to take place, in seconds</param>
 public TCAPI(Uri endpoint, IAuthenticationConfiguration authentification, ITCAPICallback tcapiCallback, IOfflineStorage offlineStorage, int statementPostInterval)
     : this(endpoint, authentification, tcapiCallback, offlineStorage, statementPostInterval, 10)
 {
 }
 /// <summary>
 /// Construct a TCAPI object with asynchronous support with a default post interval of 500ms and a default maxBatchSize of 10.
 /// </summary>
 /// <param name="endpoint">The LRS endpoint</param>
 /// <param name="authentification">Authentification object</param>
 /// <param name="tcapiCallback">Asynchornous callback object</param>
 /// <param name="offlineStorage">Offline Storage object</param>
 public TCAPI(Uri endpoint, IAuthenticationConfiguration authentification, ITCAPICallback tcapiCallback, IOfflineStorage offlineStorage)
     : this(endpoint, authentification, tcapiCallback, offlineStorage, 500, 10)
 {
 }
 /// <summary>
 /// Construct a TCAPI object with asynchronous support.
 /// </summary>
 /// <param name="endpoint">The LRS endpoint</param>
 /// <param name="authentification">Authentification object</param>
 /// <param name="tcapiCallback">Asynchornous callback object</param>
 /// <param name="offlineStorage">Offline Storage object</param>
 /// <param name="statementPostInterval">Interval for asynchronous operations to take place, in milliseconds</param>
 public TCAPI(Uri endpoint, IAuthenticationConfiguration authentification, ITCAPICallback tcapiCallback, IOfflineStorage offlineStorage, int statementPostInterval, int maxBatchSize)
     : this(endpoint, authentification, tcapiCallback, offlineStorage, statementPostInterval, maxBatchSize, DetermineVersioning(endpoint, authentification, TCAPIVersion.TinCan090))
 {
 }