/// <summary> /// Mirroring the artifacts tree to a separate tree for ui reprentation. /// </summary> /// <returns></returns> public static IList<UIArtifact> LoadUIArtifacts(IList<Artifact> model_artifacts) { IList<UIArtifact> artifacts = new List<UIArtifact>(); foreach(Artifact a in model_artifacts) { UIArtifact ua = new UIArtifact(a); foreach (ItemVersion v in a.Versions) { UIItemVersion uv = new UIItemVersion(v); foreach (Item i in v.Items) { UIItem ui = new UIItem(i); uv.Items.Add(ui); } ua.Versions.Add(uv); } artifacts.Add(ua); } return artifacts; }
private UIItem findEventItem(IList<UIItem> items, UIItem maybeDomain) { if (maybeDomain.ItemModel.Name.EndsWith("DomainEvents.wsdl")) return null; string domainEventName = maybeDomain.ItemModel.Name.Replace("Domain.wsdl", "DomainEvents.wsdl"); foreach(UIItem i in items) { if (i.ItemModel.Name == domainEventName) { return i; } } return null; }