コード例 #1
0
 /// <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;
 }
コード例 #2
0
 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);
     });
 }