private void CreateComponentLink(IAbstractComponentLink componentLink) { var component = componentLink.ComponentReference.Value; var service = component.Parent.Parent; var serviceViewModel = FindViewModel(service.AsElement().Id); var componentViewModel = FindViewModel(component.AsElement().Id); this.ViewModel.GetOrCreateComponentLink(componentLink.ParentEndpointComponents.ParentEndpoint.As <NuPattern.Runtime.IProductElement>().Id, serviceViewModel, componentViewModel); component.Publishes.CommandLinks.ForEach(x => CreateCommandLink(x)); component.Publishes.EventLinks.ForEach(x => CreateEventLink(x)); component.Subscribes.ProcessedCommandLinks.ForEach(x => CreateProcessedCommandLink(x)); component.Subscribes.SubscribedEventLinks.ForEach(x => CreateSubscribedEventLink(x)); }
private void CreateComponentLink(IAbstractComponentLink componentLink) { var component = componentLink.ComponentReference.Value; var service = component.Parent.Parent; var serviceViewModel = FindViewModel(service.AsElement().Id); var componentViewModel = FindViewModel(component.AsElement().Id); this.ViewModel.GetOrCreateComponentLink(componentLink.ParentEndpointComponents.ParentEndpoint.As<NuPattern.Runtime.IProductElement>().Id, serviceViewModel, componentViewModel); component.Publishes.CommandLinks.ForEach(x => CreateCommandLink(x)); component.Publishes.EventLinks.ForEach(x => CreateEventLink(x)); component.Subscribes.ProcessedCommandLinks.ForEach(x => CreateProcessedCommandLink(x)); component.Subscribes.SubscribedEventLinks.ForEach(x => CreateSubscribedEventLink(x)); }