예제 #1
0
 /// <summary>
 /// Creates an instance of DeviceInfo.
 /// </summary>
 /// <param name="userAgent">User agent string used to identify this device.</param>
 /// <param name="deviceId">A unique Identifier of the device.</param>
 /// <param name="provider">A reference to the base provider.</param>
 /// <param name="fallbackDevice">The fallback device to use for this device if any.</param>
 internal DeviceInfo(
     BaseProvider provider,
     string deviceId,
     string userAgent,
     DeviceInfo fallbackDevice)
     : base(provider, deviceId, userAgent)
 {
     if (fallbackDevice == null)
         throw new ArgumentNullException("fallbackDevice");
     _parent = fallbackDevice;
 }
예제 #2
0
 /// <summary>
 /// Checks if another DeviceInfo is equal to this one.
 /// </summary>
 /// <param name="other">Other DeviceInfo.</param>
 /// <returns>True if the object instances are the same.</returns>
 internal bool Equals(DeviceInfo other)
 {
     return base.Equals(other) &&
            Parent.DeviceId.Equals(other.Parent.DeviceId);
 }