예제 #1
0
 public Automata()
 {
     _states = new ObservedDictionary <string, State>(null,
                                                      x =>
     {
         foreach (var item in _states)
         {
             if (item != x)
             {
                 item.RemoveTransition(x);
             }
         }
     },
                                                      x => x.Name
                                                      );
 }
예제 #2
0
        public KeyFrameAnimation(string name)
            : base(name, null)
        {
            //Creates the Defaul cursor
            _cursors.Add(KeyFrameCursor.Create(this));

            _nodes = new ObservedDictionary <string, CurvesContainer>(
                itemAdded: x =>
            {
                x.Animation = this;
            },
                itemRemoved: x =>
            {
                if (x.Animation == this)
                {
                    x.Animation = null;
                }
            },
                keySelector: x => x.Name);
        }
 public InferenceEngine()
 {
     _facts = new ObservedDictionary <string, Fact>(x => OnFactAdded(x), x => OnFactRemoved(x), x => x.Name);
 }