public void SchedulePostPersistedSharedPropertyAndSendAnyFaults(TelemetrySession telemetrySession, ITelemetryScheduler scheduler)
 {
     CodeContract.RequiresArgumentNotNull <TelemetrySession>(telemetrySession, "telemetrySession");
     if (IsMachineStoreAccessible)
     {
         scheduler.Schedule(delegate
         {
             PostAnyFaultsGettingHardwareId(telemetrySession, telemetrySession.CancellationToken);
         }, telemetrySession.CancellationToken);
         scheduler.Schedule(delegate
         {
             PostPersistedSharedProperties(telemetrySession, telemetrySession.CancellationToken);
         }, telemetrySession.CancellationToken);
     }
 }
        public void Start(string hostName, bool isDisposing)
        {
            //IL_005b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0065: Expected O, but got Unknown
            if (!isStarted)
            {
                if (settings == null)
                {
                    settings = new TelemetryManifestManagerSettings(hostName);
                }
                if (remoteControlClient == null)
                {
                    remoteControlClient = (IRemoteControlClient)(object)new RemoteControlClient(settings.HostId, settings.BaseUrl, settings.RelativePath, (int)DownloadInterval.TotalMinutes, 60, 6);
                }
                if (!isDisposing)
                {
                    CancellationToken token      = tokenSource.Token;
                    Func <Task>       actionTask = async delegate
                    {
                        if (!token.IsCancellationRequested)
                        {
                            await Check((BehaviorOnStale)0, token).ConfigureAwait(false);

                            if (!token.IsCancellationRequested && CurrentManifest == null)
                            {
                                await Check((BehaviorOnStale)2, token).ConfigureAwait(false);
                            }
                        }
                    };
                    scheduler.Schedule(actionTask, token);
                    scheduler.ScheduleTimed((Func <Task>)Check);
                }
                isStarted = true;
            }
        }