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

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

                if (child.Type==JSCSGlueType.Command)
                    ivisitor.OnCommand(child as JSCommand);
            }
        }
Пример #2
0
        public static void ApplyOnListenable(this IJSCSGlue @this, IJSCSGlueListenableVisitor ivisitor)
        {
            foreach (var child in @this.GetAllChildren(true).Distinct())
            {
                var c_childvalue            = child.CValue;
                var NotifyCollectionChanged = c_childvalue as INotifyCollectionChanged;
                if (NotifyCollectionChanged != null)
                {
                    ivisitor.OnCollection(NotifyCollectionChanged);
                    continue;
                }

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

                if (child.Type == JSCSGlueType.Command)
                {
                    ivisitor.OnCommand(child as JSCommand);
                }
            }
        }