| 1234567891011121314151617181920212223242526272829303132 |
- using System;
- using System.Collections.Generic;
- namespace PRS.Mobile
- {
- public class StockHoldingGroup
- {
- public String UnitSize { get; private set; }
- public StockHoldingGroup(String unitsize)
- {
- UnitSize = unitsize;
- }
- }
-
- public class StockHoldingGroupEqualityComparer : IEqualityComparer<StockHoldingGroup>
- {
- public bool Equals(StockHoldingGroup x, StockHoldingGroup y)
- {
- if (ReferenceEquals(x, y)) return true;
- if (ReferenceEquals(x, null)) return false;
- if (ReferenceEquals(y, null)) return false;
- if (x.GetType() != y.GetType()) return false;
- return x.UnitSize == y.UnitSize;
- }
- public int GetHashCode(StockHoldingGroup obj)
- {
- return (obj.UnitSize != null ? obj.UnitSize.GetHashCode() : 0);
- }
- }
- }
|