public static void ApplyOnListenable(this IJSCSGlue @this, IListenableObjectVisitor ivisitor)
        {
            foreach (var child in @this.GetAllChildren(true))
            {
                var childvalue = child.CValue;
                var notifyCollectionChanged = childvalue as INotifyCollectionChanged;
                if (notifyCollectionChanged != null)
                {
                    ivisitor.OnCollection(notifyCollectionChanged);
                    continue;
                }

                var notifyPropertyChanged = childvalue as INotifyPropertyChanged;
                if ((notifyPropertyChanged != null) && !(child is IEnumerable))
                    ivisitor.OnObject(notifyPropertyChanged);

                if (child.Type==JsCsGlueType.Command)
                    ivisitor.OnCommand(child as JSCommand);
            }
        }
Exemplo n.º 2
0
        public static void ApplyOnListenable(this IJSCSGlue @this, IListenableObjectVisitor ivisitor)
        {
            foreach (var child in @this.GetAllChildren(true))
            {
                var childvalue = child.CValue;
                var notifyCollectionChanged = childvalue as INotifyCollectionChanged;
                if (notifyCollectionChanged != null)
                {
                    ivisitor.OnCollection(notifyCollectionChanged);
                    continue;
                }

                var notifyPropertyChanged = childvalue as INotifyPropertyChanged;
                if ((notifyPropertyChanged != null) && !(child is IEnumerable))
                {
                    ivisitor.OnObject(notifyPropertyChanged);
                }

                if (child.Type == JsCsGlueType.Command)
                {
                    ivisitor.OnCommand(child as JSCommand);
                }
            }
        }
Exemplo n.º 3
0
 public void Visit(IListenableObjectVisitor visitor)
 {
     _Root.ApplyOnListenable(visitor);
     _UnrootedEntities.ForEach(js => js.ApplyOnListenable(visitor));
 }
 public void Visit(IListenableObjectVisitor visitor)
 {
     _Root.ApplyOnListenable(visitor);
     _UnrootedEntities.ForEach(js => js.ApplyOnListenable(visitor));
 }