public static INotifyValue <int> AnalyzeConnectionViolationsInc(Root_MM06 Root) { return(Observable.Expression(() => (from assemblyConnector in Root.System.Connectors.OfType <ComponentBasedSystems.Assembly.AssemblyConnector>() where !assemblyConnector.ProvidingComponent.Implements.ProvidedInterfaces.Contains(assemblyConnector.Interface) || !assemblyConnector.UsingComponent.Implements.RequiredInterfaces.Contains(assemblyConnector.Interface) select assemblyConnector).Distinct().Count())); }
public static int AnalyseConnectionViolations(Root_MM06 Root) { return((from assemblyConnector in Root.System.Connectors.OfType <ComponentBasedSystems.Assembly.AssemblyConnector>() where !assemblyConnector.ProvidingComponent.Implements.ProvidedInterfaces.Contains(assemblyConnector.Interface) || !assemblyConnector.UsingComponent.Implements.RequiredInterfaces.Contains(assemblyConnector.Interface) select assemblyConnector).Distinct().Count()); }
public static INotifyValue <int> AnalyzeAllocationViolationsInc(Root_MM06 Root) { return(Observable.Expression(() => (from connector in Root.System.Connectors from assemblyAllocation in Root.Allocation.Contexts where assemblyAllocation.Assembly == connector.UsingComponent from requiredAllocation in Root.Allocation.Contexts where requiredAllocation.Assembly == connector.ProvidingComponent where requiredAllocation.Container != assemblyAllocation.Container && !Root.Environment.Links.Any(link => link.ConnectedContainers.Contains(requiredAllocation.Container) && link.ConnectedContainers.Contains(assemblyAllocation.Container)) select connector).Distinct().Count())); }