Пример #1
0
 /// <summary>
 /// 値の設定。更新が行われればtrue。setterで利用してください。
 /// </summary>
 /// <typeparam name="TO"></typeparam>
 /// <param name="value"></param>
 /// <param name="THIS"></param>
 /// <param name="propertyName"></param>
 /// <returns></returns>
 public bool Set <TO>(T value, TO THIS, [CallerMemberName] string propertyName = null)
     where TO : NotificationObject
 {
     if (EQ.Equals(store, value))
     {
         return(false);
     }
     store = value;
     THIS.OnPropertyChangedImpl(propertyName);
     return(true);
 }
Пример #2
0
    private bool checkSeen(HashSet <LR0Item> hash, Dictionary <HashSet <LR0Item>, State> seenMap)
    {
        EQ checker = new EQ();

        foreach (KeyValuePair <HashSet <LR0Item>, State> pair in seenMap)
        {
            if (checker.Equals(hash, pair.Key))
            {
                return(true);
            }
        }
        return(false);
    }