示例#1
0
        public Result Verify(ILicensedProduct licensedProduct)
        {
            if (licensedProduct == null)
            {
                throw new ArgumentNullException(nameof(licensedProduct));
            }

            if (!Signed)
            {
                throw new InvalidOperationException("This license already is not signed.");
            }

            if (ExpirationTime.Expired)
            {
                return(Result.Fail("This license is expired."));
            }

            if (!ProductName.Equals(licensedProduct.ProductName, StringComparison.Ordinal))
            {
                return(Result.Fail("This license is not for this product."));
            }

            if (!ProductVersion.Equals(licensedProduct.ProductVersion, StringComparison.Ordinal))
            {
                return(Result.Fail("This license is not for this product."));
            }

            if (!SerialNumber.Equals(licensedProduct.SerialNumber, StringComparison.Ordinal))
            {
                return(Result.Fail("This license is not for this machine."));
            }

            return(Result.Ok());
        }
        /// <summary>
        /// Returns true if DuplicateEquipmentViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of DuplicateEquipmentViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DuplicateEquipmentViewModel other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     DistrictName == other.DistrictName ||
                     DistrictName != null &&
                     DistrictName.Equals(other.DistrictName)
                 ) &&
                 (
                     SerialNumber == other.SerialNumber ||
                     SerialNumber != null &&
                     SerialNumber.Equals(other.SerialNumber)
                 ) &&
                 (
                     DuplicateEquipment == other.DuplicateEquipment ||
                     DuplicateEquipment != null &&
                     DuplicateEquipment.Equals(other.DuplicateEquipment)
                 ));
        }
示例#3
0
        public bool Equals(ICrazyradioDriver other)
        {
            if (other == null)
            {
                return(false);
            }

            return(SerialNumber.Equals(other.SerialNumber));
        }
示例#4
0
 public bool Equals(BoardModel that)
 {
     if (this == null && that == null)
     {
         return(true);
     }
     else if (that == null)
     {
         return(false);
     }
     return(SerialNumber.Equals(that.SerialNumber, StringComparison.OrdinalIgnoreCase));
 }
示例#5
0
        public bool Equals(PurchaseItemReceive other)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(ProductID.Equals(other.ProductID) && SerialNumber.Equals(other.SerialNumber));
        }
示例#6
0
        public bool Equals(SerialNumbers other)
        {
            if (Object.ReferenceEquals(other, null))
            {
                return(false);
            }

            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            return(SerialNumber.Equals(other.SerialNumber));
        }
示例#7
0
        public bool Equals(SerialNumbers other)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(SerialNumber.Equals(other.SerialNumber) && OrderItemID.Equals(other.OrderItemID));
        }
        /// <summary>
        /// Returns true if Cert instances are equal
        /// </summary>
        /// <param name="other">Instance of Cert to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Cert other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                     ) &&
                 (
                     Certificates == other.Certificates ||
                     Certificates != null &&
                     Certificates.SequenceEqual(other.Certificates)
                 ) &&
                 (
                     IssuerDN == other.IssuerDN ||
                     IssuerDN != null &&
                     IssuerDN.Equals(other.IssuerDN)
                 ) &&
                 (
                     SerialNumber == other.SerialNumber ||
                     SerialNumber != null &&
                     SerialNumber.Equals(other.SerialNumber)
                 ) &&
                 (
                     SubjectDN == other.SubjectDN ||
                     SubjectDN != null &&
                     SubjectDN.Equals(other.SubjectDN)
                 ) &&
                 (
                     ValidFrom == other.ValidFrom ||
                     ValidFrom != null &&
                     ValidFrom.Equals(other.ValidFrom)
                 ) &&
                 (
                     ValidTo == other.ValidTo ||
                     ValidTo != null &&
                     ValidTo.Equals(other.ValidTo)
                 ));
        }
示例#9
0
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            var oth = obj as ModemStatus;

            if (oth == null)
            {
                return(false);
            }
            return(IsSuccess == oth.IsSuccess &&
                   State.Equals(oth.State) &&
                   Manufacturer.Equals(oth.Manufacturer) &&
                   ModelName.Equals(oth.ModelName) &&
                   SerialNumber.Equals(oth.SerialNumber) &&
                   SignalQuality == oth.SignalQuality &&
                   Imsi.Equals(oth.Imsi) &&
                   Imei.Equals(oth.Imei) &&
                   OperatorName.Equals(oth.OperatorName));
        }
示例#10
0
        /// <summary>
        /// Returns true if DeviceInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of DeviceInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DeviceInfo other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     SerialNumber == other.SerialNumber ||
                     SerialNumber != null &&
                     SerialNumber.Equals(other.SerialNumber)
                     ) &&
                 (
                     FirmwareVersion == other.FirmwareVersion ||
                     FirmwareVersion != null &&
                     FirmwareVersion.Equals(other.FirmwareVersion)
                 ));
        }
        /// <summary>
        /// Returns true if AssetFullTextAndPropertySearch instances are equal
        /// </summary>
        /// <param name="other">Instance of AssetFullTextAndPropertySearch to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AssetFullTextAndPropertySearch other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     SearchString == other.SearchString ||
                     SearchString != null &&
                     SearchString.Equals(other.SearchString)
                     ) &&
                 (
                     SortingColumn == other.SortingColumn ||
                     SortingColumn != null &&
                     SortingColumn.Equals(other.SortingColumn)
                 ) &&
                 (
                     TagId == other.TagId ||
                     TagId != null &&
                     TagId.Equals(other.TagId)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     AssetNumber == other.AssetNumber ||
                     AssetNumber != null &&
                     AssetNumber.Equals(other.AssetNumber)
                 ) &&
                 (
                     Latitude == other.Latitude ||
                     Latitude != null &&
                     Latitude.Equals(other.Latitude)
                 ) &&
                 (
                     Longitude == other.Longitude ||
                     Longitude != null &&
                     Longitude.Equals(other.Longitude)
                 ) &&
                 (
                     AssetClass == other.AssetClass ||
                     AssetClass != null &&
                     AssetClass.Equals(other.AssetClass)
                 ) &&
                 (
                     LastModified == other.LastModified ||
                     LastModified != null &&
                     LastModified.Equals(other.LastModified)
                 ) &&
                 (
                     Created == other.Created ||
                     Created != null &&
                     Created.Equals(other.Created)
                 ) &&
                 (
                     Creator == other.Creator ||
                     Creator != null &&
                     Creator.Equals(other.Creator)
                 ) &&
                 (
                     SubNumber == other.SubNumber ||
                     SubNumber != null &&
                     SubNumber.Equals(other.SubNumber)
                 ) &&
                 (
                     CompanyCode == other.CompanyCode ||
                     CompanyCode != null &&
                     CompanyCode.Equals(other.CompanyCode)
                 ) &&
                 (
                     InventoryNumber == other.InventoryNumber ||
                     InventoryNumber != null &&
                     InventoryNumber.Equals(other.InventoryNumber)
                 ) &&
                 (
                     SerialNumber == other.SerialNumber ||
                     SerialNumber != null &&
                     SerialNumber.Equals(other.SerialNumber)
                 ) &&
                 (
                     Location == other.Location ||
                     Location != null &&
                     Location.Equals(other.Location)
                 ) &&
                 (
                     Room == other.Room ||
                     Room != null &&
                     Room.Equals(other.Room)
                 ) &&
                 (
                     CostCenter == other.CostCenter ||
                     CostCenter != null &&
                     CostCenter.Equals(other.CostCenter)
                 ) &&
                 (
                     CapitalisationDate == other.CapitalisationDate ||
                     CapitalisationDate != null &&
                     CapitalisationDate.Equals(other.CapitalisationDate)
                 ) &&
                 (
                     LastInventoryDate == other.LastInventoryDate ||
                     LastInventoryDate != null &&
                     LastInventoryDate.Equals(other.LastInventoryDate)
                 ) &&
                 (
                     AcquisitionValue == other.AcquisitionValue ||
                     AcquisitionValue != null &&
                     AcquisitionValue.Equals(other.AcquisitionValue)
                 ) &&
                 (
                     AssetSuperNumber == other.AssetSuperNumber ||
                     AssetSuperNumber != null &&
                     AssetSuperNumber.Equals(other.AssetSuperNumber)
                 ) &&
                 (
                     Vendor == other.Vendor ||
                     Vendor != null &&
                     Vendor.Equals(other.Vendor)
                 ) &&
                 (
                     TypeName == other.TypeName ||
                     TypeName != null &&
                     TypeName.Equals(other.TypeName)
                 ) &&
                 (
                     Plant == other.Plant ||
                     Plant != null &&
                     Plant.Equals(other.Plant)
                 ) &&
                 (
                     Quantity == other.Quantity ||
                     Quantity != null &&
                     Quantity.Equals(other.Quantity)
                 ) &&
                 (
                     Unit == other.Unit ||
                     Unit != null &&
                     Unit.Equals(other.Unit)
                 ) &&
                 (
                     Untaggable == other.Untaggable ||
                     Untaggable != null &&
                     Untaggable.Equals(other.Untaggable)
                 ) &&
                 (
                     Untagged == other.Untagged ||
                     Untagged != null &&
                     Untagged.Equals(other.Untagged)
                 ) &&
                 (
                     Page == other.Page ||
                     Page != null &&
                     Page.Equals(other.Page)
                 ) &&
                 (
                     PageSize == other.PageSize ||
                     PageSize != null &&
                     PageSize.Equals(other.PageSize)
                 ));
        }
示例#12
0
        /// <summary>
        /// Returns true if CarInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of CarInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CarInfo other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Model == other.Model ||
                     Model != null &&
                     Model.Equals(other.Model)
                     ) &&
                 (
                     Year == other.Year ||
                     Year != null &&
                     Year.Equals(other.Year)
                 ) &&
                 (
                     Price == other.Price ||
                     Price != null &&
                     Price.Equals(other.Price)
                 ) &&
                 (
                     SerialNumber == other.SerialNumber ||
                     SerialNumber != null &&
                     SerialNumber.Equals(other.SerialNumber)
                 ) &&
                 (
                     SoldDateUtc == other.SoldDateUtc ||
                     SoldDateUtc != null &&
                     SoldDateUtc.Equals(other.SoldDateUtc)
                 ) &&
                 (
                     Comment == other.Comment ||
                     Comment != null &&
                     Comment.Equals(other.Comment)
                 ) &&
                 (
                     Transmission == other.Transmission ||
                     Transmission != null &&
                     Transmission.Equals(other.Transmission)
                 ) &&
                 (
                     Motor == other.Motor ||
                     Motor != null &&
                     Motor.Equals(other.Motor)
                 ) &&
                 (
                     GarageId == other.GarageId ||
                     GarageId != null &&
                     GarageId.Equals(other.GarageId)
                 ) &&
                 (
                     SellerId == other.SellerId ||
                     SellerId != null &&
                     SellerId.Equals(other.SellerId)
                 ));
        }
示例#13
0
        public override bool Equals(Object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            var that = obj as DeviceInformation;

            return(Manufacturer.Equals(that.Manufacturer) && ModelNumber.Equals(that.ModelNumber) && SerialNumber.Equals(that.SerialNumber) &&
                   FirmwareRevision.Equals(that.FirmwareRevision) && HardwareRevision.Equals(that.HardwareRevision));
        }
        /// <summary>
        /// Returns true if SapInventoryAsset instances are equal
        /// </summary>
        /// <param name="other">Instance of SapInventoryAsset to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SapInventoryAsset other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     InventoryNumber == other.InventoryNumber ||
                     InventoryNumber != null &&
                     InventoryNumber.Equals(other.InventoryNumber)
                     ) &&
                 (
                     SerialNumber == other.SerialNumber ||
                     SerialNumber != null &&
                     SerialNumber.Equals(other.SerialNumber)
                 ) &&
                 (
                     Location == other.Location ||
                     Location != null &&
                     Location.Equals(other.Location)
                 ) &&
                 (
                     Room == other.Room ||
                     Room != null &&
                     Room.Equals(other.Room)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     CostCenter == other.CostCenter ||
                     CostCenter != null &&
                     CostCenter.Equals(other.CostCenter)
                 ) &&
                 (
                     CapitalisationDate == other.CapitalisationDate ||
                     CapitalisationDate != null &&
                     CapitalisationDate.Equals(other.CapitalisationDate)
                 ) &&
                 (
                     LastInventoryDate == other.LastInventoryDate ||
                     LastInventoryDate != null &&
                     LastInventoryDate.Equals(other.LastInventoryDate)
                 ) &&
                 (
                     AcquisitionValue == other.AcquisitionValue ||
                     AcquisitionValue != null &&
                     AcquisitionValue.Equals(other.AcquisitionValue)
                 ) &&
                 (
                     AssetSuperNumber == other.AssetSuperNumber ||
                     AssetSuperNumber != null &&
                     AssetSuperNumber.Equals(other.AssetSuperNumber)
                 ) &&
                 (
                     Vendor == other.Vendor ||
                     Vendor != null &&
                     Vendor.Equals(other.Vendor)
                 ) &&
                 (
                     TypeName == other.TypeName ||
                     TypeName != null &&
                     TypeName.Equals(other.TypeName)
                 ) &&
                 (
                     Plant == other.Plant ||
                     Plant != null &&
                     Plant.Equals(other.Plant)
                 ) &&
                 (
                     AssetClass == other.AssetClass ||
                     AssetClass != null &&
                     AssetClass.Equals(other.AssetClass)
                 ) &&
                 (
                     Quantity == other.Quantity ||
                     Quantity != null &&
                     Quantity.Equals(other.Quantity)
                 ) &&
                 (
                     Unit == other.Unit ||
                     Unit != null &&
                     Unit.Equals(other.Unit)
                 ) &&
                 (
                     DeactivatedOn == other.DeactivatedOn ||
                     DeactivatedOn != null &&
                     DeactivatedOn.Equals(other.DeactivatedOn)
                 ) &&
                 (
                     IsDeactivated == other.IsDeactivated ||
                     IsDeactivated != null &&
                     IsDeactivated.Equals(other.IsDeactivated)
                 ) &&
                 (
                     CompanyCodeCurrency == other.CompanyCodeCurrency ||
                     CompanyCodeCurrency != null &&
                     CompanyCodeCurrency.Equals(other.CompanyCodeCurrency)
                 ) &&
                 (
                     AssetNumber == other.AssetNumber ||
                     AssetNumber != null &&
                     AssetNumber.Equals(other.AssetNumber)
                 ) &&
                 (
                     SubNumber == other.SubNumber ||
                     SubNumber != null &&
                     SubNumber.Equals(other.SubNumber)
                 ) &&
                 (
                     CompanyCode == other.CompanyCode ||
                     CompanyCode != null &&
                     CompanyCode.Equals(other.CompanyCode)
                 ));
        }
示例#15
0
        public int ConnectStage()
        {
            try
            {
                if (SerialNumber.Equals("73000001"))
                {
                    /*
                     * 73000001 is the initial SN given to any
                     * BBD203 controller by the Kinesis Simulation software
                     * this is most likely running under simulation and should
                     * use that startup sequence.
                     */
                    SimulationManager.Instance.InitializeSimulations();
                }
                else
                {
                    // Otherwise populate the device manager like you normally do.
                    DeviceManagerCLI.BuildDeviceList();
                }
            } catch (Exception ex)
            {
                Console.WriteLine("An error occured when trying to build the device list for the stage.");
                Console.WriteLine("Exception: {0}", ex.Message);
                Console.WriteLine("Press <ENTER> to continue execution.");
                Console.ReadLine();
                return(-1);
            }
            // Create the stage object and attempt to connect to it.
            try
            {
                this._microscopemotor = BenchtopBrushlessMotor.CreateBenchtopBrushlessMotor(this._serial);
                this._microscopemotor.Connect(this._serial);
            } catch (Exception ex)
            {
                Console.WriteLine("An error occured when trying to create the actual stage object.");
                Console.WriteLine("Exception: {0}", ex.Message);
                Console.WriteLine("Press <ENTER> to continue execution.");
                Console.ReadLine();
            }

            // Setup the axes
            // X - Stepover Axis
            // Y - Scanning Axis
            this._stepoverchannel = this._microscopemotor.GetChannel(2);
            this._stepoverchannel.StartPolling(this._pollFrequency);
            if (!this._stepoverchannel.IsSettingsInitialized())
            {
                this._stepoverchannel.WaitForSettingsInitialized(this._initTimeoutMillis);
            }
            this._scanningchannel = this._microscopemotor.GetChannel(1);
            this._scanningchannel.StartPolling(this._pollFrequency);
            if (!this._scanningchannel.IsSettingsInitialized())
            {
                this._scanningchannel.WaitForSettingsInitialized(this._initTimeoutMillis);
            }
            // Enable both axes
            this._stepoverchannel.EnableDevice();
            this._scanningchannel.EnableDevice();
            // Load the motor configurations off the device
            this._stepoverconfig = this._stepoverchannel.GetMotorConfiguration(this._stepoverchannel.DeviceID, DeviceConfiguration.DeviceSettingsUseOptionType.UseDeviceSettings);
            this._scanningconfig = this._scanningchannel.GetMotorConfiguration(this._scanningchannel.DeviceID, DeviceConfiguration.DeviceSettingsUseOptionType.UseDeviceSettings);
            this._isConnected    = true;
            // Start various stage polling functions
            this._pollingactive = true;
            return(0);
        }
示例#16
0
 public bool Equals(string name)
 {
     return(SerialNumber.Equals(name));
 }