예제 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Foreign.GetHashCode() * 397) ^ GlossCandidates.DefaultIfEmpty("").Aggregate(0, (h, s) => h * 397 + s.GetHashCode()));
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         return((base.GetHashCode() * 397) ^ (Foreign != null ? Foreign.GetHashCode() : 0));
     }
 }
예제 #3
0
파일: FxPair.cs 프로젝트: mpvyard/qwack
 public override int GetHashCode()
 {
     unchecked
     {
         var result = Foreign.GetHashCode();
         result = (result * 397) ^ Domestic.GetHashCode();
         result = (result * 397) ^ SettlementCalendar.GetHashCode();
         result = (result * 397) ^ SpotLag.GetHashCode();
         return(result);
     }
 }
예제 #4
0
파일: VarDefine.cs 프로젝트: e2wugui/zeze
        public void UpdateForeign(string oldForeign, string newForeign)
        {
            if (string.IsNullOrEmpty(Foreign))
            {
                return;
            }

            if (Foreign.Equals(oldForeign))
            {
                Foreign = newForeign;
                Parent.Document.IsChanged = true;

                // 这个方法肯定在 FormDefine 打开时调用。否则下面增加重新 Reload 的代码不会被触发。
                // TODO Foreign 由于改名更新不需要 Reload 吧。需要确认。
                if (Parent.Document.GridData?.View != null)
                {
                    FormMain.Instance.ReloadGridsAfterFormDefineClosed.Add(Parent.Document.GridData.View);
                }
            }
        }