示例#1
0
 /// <summary>
 /// Configuration for Glean.
 /// </summary>
 /// <param name="serverEndpoint"> the server pings are sent to. Please note that this
 /// is only meant to be changed for tests.</param>
 /// <param name="channel">the release channel the application is on, if known. This will be
 /// sent along with all the pings, in the `client_info` section.</param>
 /// <param name="buildId">a build identifier generated by the CI system</param>
 /// <param name="maxEvents">the number of events to store before the events ping is sent.</param>
 /// <param name="httpClient">The HTTP client implementation to use for uploading pings.</param>
 public Configuration(
     string serverEndpoint    = DefaultTelemetryEndpoint,
     string channel           = null,
     string buildId           = null,
     int?maxEvents            = null,
     IPingUploader httpClient = null)
 {
     this.serverEndpoint = serverEndpoint;
     this.channel        = channel;
     this.buildId        = buildId;
     this.maxEvents      = maxEvents;
     this.httpClient     = httpClient ?? new HttpClientUploader();
 }
示例#2
0
 /// <summary>
 /// Configuration for Glean.
 /// </summary>
 /// <param name="serverEndpoint"> the server pings are sent to. Please note that this
 /// is only meant to be changed for tests.</param>
 /// <param name="channel">the release channel the application is on, if known. This will be
 /// sent along with all the pings, in the `client_info` section.</param>
 /// <param name="maxEvents">the number of events to store before the events ping is sent.</param>
 /// <param name="httpClient">The HTTP client implementation to use for uploading pings.</param>
 /// <param name="logPings">Whether to log ping contents to the console</param>
 /// <param name="pingTag">String tag to be applied to headers when uploading pings for debug view.</param>
 public Configuration(
     string serverEndpoint    = DefaultTelemetryEndpoint,
     string channel           = null,
     int?maxEvents            = null,
     IPingUploader httpClient = null,
     bool logPings            = false,
     string pingTag           = null)
 {
     this.serverEndpoint = serverEndpoint;
     this.channel        = channel;
     this.maxEvents      = maxEvents;
     this.httpClient     = httpClient ?? new HttpClientUploader();
     this.logPings       = logPings;
     this.pingTag        = pingTag;
 }
示例#3
0
 internal BaseUploader(IPingUploader uploader)
 {
     this.uploader = uploader;
 }