public static IEnumerable <IJSCSGlue> GetAllChildren(this IJSCSGlue @this, bool includeMySelf = false) { var res = new HashSet <IJSCSGlue>(); @this.GetAllChildren(includeMySelf, res); return(res); }
private ISet <IJSCSGlue> GetAllChildren() { var @glues = _Root.GetAllChildren(true); @glues.UnionWith(_UnrootedEntities.SelectMany(ent => ent.GetAllChildren(true))); return(@glues); }
public void UpdateJavascriptValue() { var builders = _Root.GetAllChildren(true).Where(glue => glue.JSValue == null) .Select(glue => new JSBuilderAdapter(glue, this)).ToList(); builders.ForEach(builder => builder.GetBuildRequest()); CreateObjects(); UpdateDependencies(); }
public static ISet <IJSCSGlue> GetAllChildren(this IJSCSGlue @this, bool includeMySelf = false) { var res = new HashSet <IJSCSGlue>(); if (includeMySelf) { res.Add(@this); } @this.GetAllChildren(res); return(res); }
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); } } }