Example #1
0
 /// <summary>
 /// Sets the enabled state of the class.
 /// </summary>
 internal NewDevice(string newDevicesUrl, NewDeviceDetails newDeviceDetail)
 {
     if (Uri.TryCreate(newDevicesUrl, UriKind.RelativeOrAbsolute, out _newDevicesUrl))
         _enabled = true;
     _newDeviceDetail = newDeviceDetail;
 }
Example #2
0
            internal NewDeviceData(HttpRequest request, NewDeviceDetails newDeviceDetail)
            {
                _content = RequestHelper.GetContent(request,
                                                    newDeviceDetail == NewDeviceDetails.Maximum);
                _userAgent = request.UserAgent;
                _isLocal = request.IsLocal;

                // If the headers contain 51D as a setting or the request is to a
                // web service then do not send the data.
                _ignore = request.Headers["51D"] != null ||
                    request.Url.Segments[request.Url.Segments.Length - 1].EndsWith("asmx");
            }