public bool Equals(IResolverInfo other)
 {
     if (other is UsbBcpResolverInfo)
     {
         var otherUsb = (UsbBcpResolverInfo)other;
         return(otherUsb.ProductId == ProductId && otherUsb.VendorId == VendorId && other.SerialNumber == SerialNumber);
     }
     return(false);
 }
 public bool Equals(IResolverInfo other)
 {
     if (other is UsbResolverInfo)
     {
         var otherUsb = (UsbResolverInfo)other;
         return otherUsb.ProductId == ProductId && otherUsb.VendorId == VendorId && otherUsb.SymbolicName == otherUsb.SymbolicName;
     }
     return false;
 }
        public static bool ResolveUSB(IResolverInfo resolverInfo)
        {
            var usbResolverInfo = resolverInfo as UsbResolverInfo;

            if (usbResolverInfo == null)
            {
                return(false);
            }
            return(vivoVendorIds.Contains(usbResolverInfo.VendorId) &&
                   vivoProductIds.Contains(usbResolverInfo.ProductId));
        }
Exemple #4
0
        private static bool ResolveVivo(IResolverInfo resolverInfo, Product product)
        {
            if (resolverInfo is NetworkResolverInfo)
            {
                var networkInfo = resolverInfo as NetworkResolverInfo;

                return(product.ModelName.Equals(networkInfo.DeviceName, StringComparison.OrdinalIgnoreCase));
            }
            else if (resolverInfo is UsbResolverInfo)
            {
                var usbInfo = resolverInfo as UsbResolverInfo;
                return(usbInfo.VendorId == 0x1DAF && usbInfo.ProductId == 45);
            }

            return(false);
        }
Exemple #5
0
 public bool Matches(IResolverInfo info)
 {
     return(resolveFunc(info));
 }
Exemple #6
0
 private static bool ResolveVivo35(IResolverInfo resolverInfo)
 {
     return(ResolveVivo(resolverInfo, Vivo35));
 }
Exemple #7
0
 private static bool ResolveNippy4Plus(IResolverInfo resolverInfo)
 {
     return(ResolveVivo(resolverInfo, Nippy4Plus));
 }
Exemple #8
0
 private static bool ResolveVivo45LS(IResolverInfo resolverInfo)
 {
     return(ResolveVivo(resolverInfo, Vivo45LS));
 }
Exemple #9
0
 public bool Equals(IResolverInfo other)
 {
     return(false);
 }
Exemple #10
0
 public MockCommunication(IResolverInfo resolverInfo)
 {
     this._resolverInfo = resolverInfo;
 }
        public bool Equals(IResolverInfo other)
        {
            var otherNetwork = other as NetworkResolverInfo;

            return(otherNetwork != null && otherNetwork.IpAddress == IpAddress && otherNetwork.Port == Port);
        }