예제 #1
0
        public ShopItemInfo GetFirstItemInfo(ItemNumber itemNumber)
        {
            var firstPrice = GetFirstPrice(itemNumber);
            var item       = GetItem(itemNumber);

            return(item?.GetItemInfo(firstPrice));
        }
        private static ItemInfo LoadAction(ItemNumber id, ItemInfoItemDto itemDto)
        {
            if (itemDto.action == null)
            {
                Logger.Warning("Missing action for item {id}", id);
                return(new ItemInfoAction());
            }

            var item = new ItemInfoAction
            {
                RequiredMP       = float.Parse(itemDto.action.ability.required_mp, CultureInfo.InvariantCulture),
                DecrementMP      = float.Parse(itemDto.action.ability.decrement_mp, CultureInfo.InvariantCulture),
                DecrementMPDelay = float.Parse(itemDto.action.ability.decrement_mp_delay, CultureInfo.InvariantCulture)
            };

            if (itemDto.action.@float != null)
            {
                item.ValuesF = [email protected](f => float.Parse(f.value.Replace("f", ""), CultureInfo.InvariantCulture)).ToList();
            }

            if (itemDto.action.integer != null)
            {
                item.Values = itemDto.action.integer.Select(i => i.value).ToList();
            }

            return(item);
        }
예제 #3
0
        public ShopPrice GetPrice(ItemNumber itemNumber, ItemPriceType priceType, ItemPeriodType periodType,
                                  ushort period)
        {
            var itemInfo = GetItemInfo(itemNumber, priceType);

            return(itemInfo?.PriceGroup.GetPrice(periodType, period));
        }
예제 #4
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (ReferenceNumber != null)
         {
             hashCode = hashCode * 59 + ReferenceNumber.GetHashCode();
         }
         if (ItemNumber != null)
         {
             hashCode = hashCode * 59 + ItemNumber.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (DispositionType != null)
         {
             hashCode = hashCode * 59 + DispositionType.GetHashCode();
         }
         if (DispositionInstructions != null)
         {
             hashCode = hashCode * 59 + DispositionInstructions.GetHashCode();
         }
         if (Labels != null)
         {
             hashCode = hashCode * 59 + Labels.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #5
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((ItemNumber != null ? ItemNumber.GetHashCode() : 0) * 397) ^ (YearQuarter != null ? YearQuarter.GetHashCode() : 0));
     }
 }
예제 #6
0
        public void AddNewCikk(ItemNumber item, MonitorPosition pos)
        {
            if (Items.Count < MaxCikkCount)
            {
                if (item != default)
                {
                    if (pos != MonitorPosition.None)
                    {
                        foreach (var pDF in item.PDFs)
                        {
                            pDF.Position = pos;
                        }
                    }
                    else
                    {
                        for (int i = 0; i < item.PDFs.Count; i++)
                        {
                            item.PDFs[i].Position = (MonitorPosition)i;
                        }
                    }

                    Items.Add(item);
                }
            }
        }
예제 #7
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (ReferenceNumber != null)
         {
             hashCode = hashCode * 59 + ReferenceNumber.GetHashCode();
         }
         if (ItemNumber != null)
         {
             hashCode = hashCode * 59 + ItemNumber.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (ReturnReason != null)
         {
             hashCode = hashCode * 59 + ReturnReason.GetHashCode();
         }
         if (ReasonText != null)
         {
             hashCode = hashCode * 59 + ReasonText.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #8
0
        /// <summary>
        /// Returns true if InlineResponse200 instances are equal
        /// </summary>
        /// <param name="other">Instance of InlineResponse200 to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InlineResponse200 other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ReferenceNumber == other.ReferenceNumber ||
                     ReferenceNumber != null &&
                     ReferenceNumber.Equals(other.ReferenceNumber)
                     ) &&
                 (
                     ItemNumber == other.ItemNumber ||
                     ItemNumber != null &&
                     ItemNumber.Equals(other.ItemNumber)
                 ) &&
                 (
                     LinkedFees == other.LinkedFees ||
                     LinkedFees != null &&
                     LinkedFees.SequenceEqual(other.LinkedFees)
                 ));
        }
        public void Update_ItemWillNotUpdateNonEditableFields()
        {
            var appId = new Guid("E8349DE1-65E4-E811-8226-D89EF34A256D");

            var itemNumber = new ItemNumber
            {
                InvoiceItemNumber = "1234",
                VendorName        = "Bob's Burgers",
                VendorNumber      = "1",
                JDENumber         = "Bob"
            };

            var key = itemNumberRepository.Insert(itemNumber).key;

            var item = new Dictionary <Guid, object>
            {
                { new Guid("82497bb3-98e6-e811-8226-d89ef34a256d"), "12345" },
                { new Guid("83497bb3-98e6-e811-8226-d89ef34a256d"), "Bob" },
                { new Guid("84497bb3-98e6-e811-8226-d89ef34a256d"), "Bob" },
                { new Guid("85497bb3-98e6-e811-8226-d89ef34a256d"), "Bob" },
                { new Guid("ff9264c6-52e8-e811-8229-d89ef34a256d"), key }
            };

            repository.Update(appId, item);

            var updatedItem = itemNumberRepository.Get(key);

            Assert.AreNotEqual("12345", updatedItem.VendorNumber);
        }
        public void valid(string number)
        {
            var n = new ItemNumber(number);

            Assert.Equal(42, n.Value);
            Assert.Equal("42", n.ToString());
        }
예제 #11
0
    public void ChangeTexture(string name, string type)
    {
        if (!ItemManager.Instance)
        {
            return;
        }
        ItemName            = name;
        ItemType            = type;
        image               = transform.GetChild(0).GetComponent <Image>();
        itemNumberText      = transform.GetChild(1).GetComponent <Text>();
        itemNumberText.text = ItemNumber.ToString();
        transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
        if (name == "null")
        {
            image.sprite = null;
            transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
            itemNumberText.text = null;
            ItemNumber          = 0;
            return;
        }
        // itemPath = (string)ItemManager.Instance.propValue[name]["path"];
        itemPath = (string)ItemManager.Instance.GetPropertyByName(name, type, "path");
        Sprite sprite = Resources.Load <Sprite>(itemPath);

        image.sprite = sprite;
    }
예제 #12
0
        public async Task CBloodCastleMove(GSSession session, CBloodCastleMove message)
        {
            var plr   = session.Player;
            var @char = session.Player.Character;

            var invisibleCloack = @char.Inventory.Get(message.ItemPos);
            var evbc            = Program.EventManager.GetEvent <BloodCastles>();
            var itemLevel       = evbc.GetEventNumber(plr);

            if (invisibleCloack.Plus != message.Bridge && invisibleCloack.Number != ItemNumber.FromTypeIndex(13, 47))
            {
                await session.SendAsync(new SBloodCastleMove(1));

                return;
            }

            if (itemLevel != invisibleCloack.Plus)
            {
                await session.SendAsync(new SBloodCastleMove((byte)(itemLevel > invisibleCloack.Plus ? 4 : 3)));

                return;
            }

            if (!evbc.TryAdd(plr))
            {
                await session.SendAsync(new SBloodCastleMove(5));

                return;
            }

            await @char.Inventory.Delete(message.ItemPos);
        }
예제 #13
0
        public IEnumerable <ItemInfo> LoadItems_2()
        {
            var dto         = Deserialize <ItemInfoDto_2>("xml/item.x7");
            var stringTable = Deserialize <StringTableDto_2>("language/xml/iteminfo_string_table.x7");
            var ids         = new List <ItemNumber>();

            foreach (var itemDto in dto.item)
            {
                var id = new ItemNumber(itemDto.item_key);
                if (!ids.Contains(id))
                {
                    ids.Add(id);
                    var item = new ItemInfo();
                    item.ItemNumber  = id;
                    item.Level       = 0;
                    item.MasterLevel = 0;
                    item.Gender      = ParseGender_2(itemDto.Base.sex);
                    item.Image       = itemDto.graphic.icon_image;

                    var name = [email protected](s =>
                                                                  s.key.Equals(itemDto.Base.name_key, StringComparison.InvariantCultureIgnoreCase));
                    if (!string.IsNullOrWhiteSpace(name?.eng) && name?.eng.ToLower() != "no trans" && name?.eng.ToLower() != "not trans")
                    {
                        yield return(item);
                    }
                }
            }
        }
예제 #14
0
        public ShopItem GetItem(ItemNumber itemNumber)
        {
            ShopItem shopItem;

            Items.TryGetValue(itemNumber, out shopItem);
            return(shopItem);
        }
예제 #15
0
        public async Task CBloodCastleMove(GSSession session, CBloodCastleMove message)
        {
            var plr   = session.Player;
            var @char = session.Player.Character;

            var invisibleCloack = @char.Inventory.Get(message.ItemPos);
            var itemLevel       = BloodCastles.GetNeededLevel(plr);

            if (invisibleCloack.Plus != message.Bridge && invisibleCloack.Number != ItemNumber.FromTypeIndex(13, 47))
            {
                await session.SendAsync(new SBloodCastleMove(1));

                return;
            }

            if (itemLevel != invisibleCloack.Plus)
            {
                await session.SendAsync(new SBloodCastleMove((byte)(itemLevel > invisibleCloack.Plus ? 4 : 3)));

                return;
            }

            if (!BloodCastles.TryAdd(message.Bridge, plr))
            {
                await session.SendAsync(new SBloodCastleMove(5));

                return;
            }

            @char.Inventory.Delete(message.ItemPos);
        }
예제 #16
0
        public async Task CQuestEXPEventItemEPList(GSSession session)
        {
            var @char = session.Player.Character;

            if (@char.BaseClass == HeroClass.DarkLord || @char.BaseClass == HeroClass.MagicGladiator || @char.BaseClass == HeroClass.RageFighter)
            {
                return;
            }
            var rings = session.Player.Character.Inventory.FindAllItems(ItemNumber.FromTypeIndex(13, 20)).Where(x => x.Plus == 1 || x.Plus == 2);

            if (@char.Level >= 80 || rings.Any())
            {
                return;
            }

            var qs = @char.Quests.GetEpisodeState(1);

            if (qs < 3)
            {
                var q = @char.Quests.GetEpisode <QuestInfoIndex>(1, 0);
                await session.SendAsync(new SQuestSwitchListEvent
                {
                    QuestList = new uint[] { q.Index },
                });
            }
        }
예제 #17
0
 public Item(ItemNumber itemNumber, string name, string imageName, S4ZipEntry[] imageEntries)
 {
     ItemNumber    = itemNumber;
     Name          = name;
     _imageEntries = imageEntries;
     _imageName    = imageName;
     _image        = new ReactiveProperty <Bitmap>();
 }
 public void Normalize()
 {
     this.BillCode    = BillCode?.Trim();
     this.RangeBegin  = RangeBegin?.DateBegin();
     this.RangeEnd    = RangeEnd?.DateEnd();
     this.OrderNumber = OrderNumber?.Trim().ToUpper();
     this.ItemNumber  = ItemNumber?.Trim().ToUpper();
 }
예제 #19
0
        //private static CostumeSlot ParseDefaultItemSlot(string slot)
        //{
        //    Func<string, bool> equals = str => slot.Equals(str, StringComparison.InvariantCultureIgnoreCase);

        //    if (equals("hair"))
        //        return CostumeSlot.Hair;

        //    if (equals("face"))
        //        return CostumeSlot.Face;

        //    if (equals("coat"))
        //        return CostumeSlot.Shirt;

        //    if (equals("pants"))
        //        return CostumeSlot.Pants;

        //    if (equals("gloves"))
        //        return CostumeSlot.Gloves;

        //    if (equals("shoes"))
        //        return CostumeSlot.Shoes;

        //    throw new Exception("Invalid slot " + slot);
        //}

        #endregion

        #region Items

        public IEnumerable <ItemInfo> LoadItems()
        {
            var dto         = Deserialize <ItemInfoDto>("xml/iteminfo.x7");
            var stringTable = Deserialize <StringTableDto>("language/xml/iteminfo_string_table.xml");

            foreach (var categoryDto in dto.category)
            {
                foreach (var subCategoryDto in categoryDto.sub_category)
                {
                    foreach (var itemDto in subCategoryDto.item)
                    {
                        var      id = new ItemNumber(categoryDto.id, subCategoryDto.id, itemDto.number);
                        ItemInfo item;

                        switch (id.Category)
                        {
                        case ItemCategory.Skill:
                            item = LoadAction(id, itemDto);
                            break;

                        case ItemCategory.Weapon:
                            item = LoadWeapon(id, itemDto);
                            break;

                        default:
                            item = new ItemInfo();
                            break;
                        }

                        item.ItemNumber  = id;
                        item.Level       = [email protected]_info.require_level;
                        item.MasterLevel = [email protected]_info.require_master;
                        item.Gender      = ParseGender(itemDto.SEX);
                        item.Image       = itemDto.client.icon.image;

                        if ([email protected] != null)
                        {
                            item.License = ParseItemLicense([email protected]);
                        }

                        var name = [email protected](s => s.key.Equals([email protected]_info.name_key, StringComparison.InvariantCultureIgnoreCase));
                        if (string.IsNullOrWhiteSpace(name?.eng))
                        {
                            Logger.Warn()
                            .Message("Missing english translation for {0}", name != null ? [email protected]_info.name_key : id.ToString())
                            .Write();
                            item.Name = name != null ? name.key : itemDto.NAME;
                        }
                        else
                        {
                            item.Name = name.eng;
                        }

                        yield return(item);
                    }
                }
            }
        }
예제 #20
0
 public CapsuleRewardDto(CapsuleRewardType _type, uint _pen, ItemNumber _itemnumber, ItemPriceType _priceType,
                         ItemPeriodType _periodType, uint _period)
 {
     RewardType = _type;
     PEN        = _pen;
     ItemNumber = _itemnumber;
     PriceType  = _priceType;
     PeriodType = _periodType;
     Period     = _period;
 }
예제 #21
0
        public ItemPriceType GetFirstPrice(ItemNumber itemNumber)
        {
            var item     = GetItem(itemNumber);
            var iteminfo = item.ItemInfos.FirstOrDefault(x => x.PriceGroup.PriceType != ItemPriceType.None);

            if (iteminfo != null)
            {
                return(iteminfo.PriceGroup.PriceType);
            }

            return(ItemPriceType.None);
        }
예제 #22
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 44, Configuration.FieldSeparator),
                       Id,
                       SetIdFt1.HasValue ? SetIdFt1.Value.ToString(culture) : null,
                       TransactionId,
                       TransactionBatchId,
                       TransactionDate?.ToDelimitedString(),
                       TransactionPostingDate.HasValue ? TransactionPostingDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       TransactionType?.ToDelimitedString(),
                       TransactionCode?.ToDelimitedString(),
                       TransactionDescription,
                       TransactionDescriptionAlt,
                       TransactionQuantity.HasValue ? TransactionQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       TransactionAmountExtended?.ToDelimitedString(),
                       TransactionAmountUnit?.ToDelimitedString(),
                       DepartmentCode?.ToDelimitedString(),
                       HealthPlanId?.ToDelimitedString(),
                       InsuranceAmount?.ToDelimitedString(),
                       AssignedPatientLocation?.ToDelimitedString(),
                       FeeSchedule?.ToDelimitedString(),
                       PatientType?.ToDelimitedString(),
                       DiagnosisCodeFt1 != null ? string.Join(Configuration.FieldRepeatSeparator, DiagnosisCodeFt1.Select(x => x.ToDelimitedString())) : null,
                       PerformedByCode != null ? string.Join(Configuration.FieldRepeatSeparator, PerformedByCode.Select(x => x.ToDelimitedString())) : null,
                       OrderedByCode != null ? string.Join(Configuration.FieldRepeatSeparator, OrderedByCode.Select(x => x.ToDelimitedString())) : null,
                       UnitCost?.ToDelimitedString(),
                       FillerOrderNumber?.ToDelimitedString(),
                       EnteredByCode != null ? string.Join(Configuration.FieldRepeatSeparator, EnteredByCode.Select(x => x.ToDelimitedString())) : null,
                       ProcedureCode?.ToDelimitedString(),
                       ProcedureCodeModifier != null ? string.Join(Configuration.FieldRepeatSeparator, ProcedureCodeModifier.Select(x => x.ToDelimitedString())) : null,
                       AdvancedBeneficiaryNoticeCode?.ToDelimitedString(),
                       MedicallyNecessaryDuplicateProcedureReason?.ToDelimitedString(),
                       NdcCode?.ToDelimitedString(),
                       PaymentReferenceId?.ToDelimitedString(),
                       TransactionReferenceKey != null ? string.Join(Configuration.FieldRepeatSeparator, TransactionReferenceKey.Select(x => x.ToString(Consts.NumericFormat, culture))) : null,
                       PerformingFacility != null ? string.Join(Configuration.FieldRepeatSeparator, PerformingFacility.Select(x => x.ToDelimitedString())) : null,
                       OrderingFacility?.ToDelimitedString(),
                       ItemNumber?.ToDelimitedString(),
                       ModelNumber,
                       SpecialProcessingCode != null ? string.Join(Configuration.FieldRepeatSeparator, SpecialProcessingCode.Select(x => x.ToDelimitedString())) : null,
                       ClinicCode?.ToDelimitedString(),
                       ReferralNumber?.ToDelimitedString(),
                       AuthorizationNumber?.ToDelimitedString(),
                       ServiceProviderTaxonomyCode?.ToDelimitedString(),
                       RevenueCode?.ToDelimitedString(),
                       PrescriptionNumber,
                       NdcQtyAndUom?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
예제 #23
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ItemNumber.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)PriceType;
         hashCode = (hashCode * 397) ^ (int)PeriodType;
         hashCode = (hashCode * 397) ^ Period.GetHashCode();
         hashCode = (hashCode * 397) ^ Color.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Effect;
         return(hashCode);
     }
 }
예제 #24
0
        public async Task NewItem(ItemNumber itemNumber)
        {
            using (var db = _databaseService.Open <GameContext>())
            {
                var itemEntity = new ShopItemEntity
                {
                    Id = itemNumber
                };
                db.Items.Add(itemEntity);
                await db.SaveChangesAsync();

                Items.Add(new ShopItem(itemEntity));
            }
        }
예제 #25
0
    public ItemNumber loadItem(string str, int panelIndex)
    {
        GameObject go = (GameObject)Resources.Load("prefab/item/ItemNumber");

        go = Object.Instantiate(go);

        go.transform.parent = panels[panelIndex].content.transform;

        ItemNumber item = go.GetComponent <ItemNumber>();

        item.transform.localPosition = new Vector3(0, calcOffset(panelIndex), 0);
        item.text.text = str;
        return(item);
    }
예제 #26
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (ReferenceNumber != null)
         {
             hashCode = hashCode * 59 + ReferenceNumber.GetHashCode();
         }
         if (ItemNumber != null)
         {
             hashCode = hashCode * 59 + ItemNumber.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (UnitSellPrice != null)
         {
             hashCode = hashCode * 59 + UnitSellPrice.GetHashCode();
         }
         if (UnitItemTaxPrice != null)
         {
             hashCode = hashCode * 59 + UnitItemTaxPrice.GetHashCode();
         }
         if (UnitShippingPrice != null)
         {
             hashCode = hashCode * 59 + UnitShippingPrice.GetHashCode();
         }
         if (UnitShippingTaxPrice != null)
         {
             hashCode = hashCode * 59 + UnitShippingTaxPrice.GetHashCode();
         }
         if (Coupons != null)
         {
             hashCode = hashCode * 59 + Coupons.GetHashCode();
         }
         if (LinkedFees != null)
         {
             hashCode = hashCode * 59 + LinkedFees.GetHashCode();
         }
         if (DeliveryDetail != null)
         {
             hashCode = hashCode * 59 + DeliveryDetail.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #27
0
        public override bool TryAdd(Player plr)
        {
            var result = new SImperialEnterResult
            {
                Day       = DateTime.Now.DayOfWeek,
                Index     = plr.ID,
                Result    = 0,
                State     = 1,
                Unk       = 0,
                EntryTime = 0,
            };

            if (plr.Character.Party == null)
            {
                result.Result = 6;
                _             = plr.Session.SendAsync(result);
                return(false);
            }

            var itNum      = ItemNumber.FromTypeIndex(14, (ushort)(result.Day == DayOfWeek.Sunday ? 109 : 102));
            var invitation = plr.Character.Inventory.FindAll(itNum);

            if (invitation.Length <= 0)
            {
                result.Result = 2;
                _             = plr.Session.SendAsync(result);
                return(false);
            }

            if (CurrentState != EventState.Open && _players.First().Player.Character.Party != plr.Character.Party)
            {
                result.Result = 1;
                _             = plr.Session.SendAsync(result);
                return(false);
            }

            _          = plr.Character.Inventory.Delete(invitation.First());
            plr.Window = null;
            _          = plr.Character.WarpTo(_imperialGates[(int)result.Day]);

            _players.Add(new PlayerEventInfo {
                Eventer = true, Player = plr
            });
            plr.Character.MapChanged   += OnPlayerLeave;
            plr.Character.CharacterDie += OnPlayerDead;

            return(true);
        }
예제 #28
0
 public void init()
 {
     for (int i = 0; i < itemLists.Length; i++)
     {
         itemLists[i] = new List <ItemNumber>();
         for (int j = 0; j < 10; j++)
         {
             ItemNumber item = loadItem(j.ToString(), i);
             itemLists[i].Add(item);
             this.half = itemLists[i].Count * ROW_GAP >> 1;
         }
         acceleration[i] = DEFAULT_ACCELERATION;
         resize(i);
         //breakIndex[i] = Random.Range(0, 10);
         subState[i] = SubState.SUBSTATE_STOP;
     }
 }
예제 #29
0
        /// <summary>
        /// Returns true if ReturnAuthorizationReturnDispositions instances are equal
        /// </summary>
        /// <param name="other">Instance of ReturnAuthorizationReturnDispositions to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ReturnAuthorizationReturnDispositions other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ReferenceNumber == other.ReferenceNumber ||
                     ReferenceNumber != null &&
                     ReferenceNumber.Equals(other.ReferenceNumber)
                     ) &&
                 (
                     ItemNumber == other.ItemNumber ||
                     ItemNumber != null &&
                     ItemNumber.Equals(other.ItemNumber)
                 ) &&
                 (
                     Quantity == other.Quantity ||
                     Quantity != null &&
                     Quantity.Equals(other.Quantity)
                 ) &&
                 (
                     DispositionType == other.DispositionType ||
                     DispositionType != null &&
                     DispositionType.Equals(other.DispositionType)
                 ) &&
                 (
                     DispositionInstructions == other.DispositionInstructions ||
                     DispositionInstructions != null &&
                     DispositionInstructions.SequenceEqual(other.DispositionInstructions)
                 ) &&
                 (
                     Labels == other.Labels ||
                     Labels != null &&
                     Labels.SequenceEqual(other.Labels)
                 ));
        }
예제 #30
0
        public bool Equals(ShopItemDto other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(ItemNumber.Equals(other.ItemNumber) &&
                   PriceType == other.PriceType &&
                   PeriodType == other.PeriodType &&
                   Period == other.Period &&
                   Color == other.Color &&
                   Effect == other.Effect);
        }