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; } }
/// <summary> /// Constructs a builder using explicitly supplied member variables. /// </summary> /// <param name="theRemoteControlClient"></param> /// <param name="theSettings"></param> /// <param name="theManifestParser"></param> /// <param name="theScheduler"></param> public TelemetryManifestManagerBuilder(object theRemoteControlClient, ITelemetryManifestManagerSettings theSettings, ITelemetryManifestParser theManifestParser, ITelemetryScheduler theScheduler) { remoteControlClient = theRemoteControlClient; settings = theSettings; manifestParser = theManifestParser; scheduler = theScheduler; }
public TelemetryManifestManager(IRemoteControlClient theRemoteControlClient, ITelemetryManifestManagerSettings theSettings, ITelemetryManifestParser theManifestParser, ITelemetryScheduler theScheduler, TelemetrySession theMainSession) { CodeContract.RequiresArgumentNotNull <ITelemetryManifestParser>(theManifestParser, "theManifestParser"); CodeContract.RequiresArgumentNotNull <ITelemetryScheduler>(theScheduler, "theScheduler"); CodeContract.RequiresArgumentNotNull <TelemetrySession>(theMainSession, "theMainSession"); manifestParser = theManifestParser; scheduler = theScheduler; scheduler.InitializeTimed(ReadInterval); mainSession = theMainSession; remoteControlClient = theRemoteControlClient; settings = theSettings; RemoteControlClient.TelemetryLogger2 = ((Action <string, IDictionary <string, object>, IDictionary <string, object> >) delegate(string eventName, IDictionary <string, object> properties, IDictionary <string, object> piiProperties) { TelemetryEvent telemetryEvent = new TelemetryEvent(eventName); DictionaryExtensions.AddRange <string, object>(telemetryEvent.Properties, properties, true); DictionaryExtensions.AddRange <string, object>(telemetryEvent.Properties, (IDictionary <string, object>)((IEnumerable <KeyValuePair <string, object> >)piiProperties).ToDictionary((Func <KeyValuePair <string, object>, string>)((KeyValuePair <string, object> p) => p.Key), (Func <KeyValuePair <string, object>, object>)((KeyValuePair <string, object> p) => new TelemetryPiiProperty(p.Value))), true); mainSession.PostEvent(telemetryEvent); }); }