public ExplicitDependencyMap AddDependency(string propertyName, string invocationPath) { ExplicitDependency dependency = this.dependencies.FirstOrDefault(d => d.PropertyName == propertyName); if (dependency == null) { dependency = new ExplicitDependency(propertyName, new[] { invocationPath }); this.dependencies.Add(dependency); } else if (!dependency.Dependencies.Any(p => p.StartsWith(invocationPath))) { dependency.Dependencies.Add(invocationPath); } return(this); }
public ExplicitDependencyMap AddDependency( string propertyName, string invocationPath ) { ExplicitDependency dependency = this.dependencies.FirstOrDefault( d => d.PropertyName == propertyName ); if ( dependency == null ) { dependency = new ExplicitDependency( propertyName, new[] { invocationPath } ); this.dependencies.Add( dependency ); } else if ( !dependency.Dependencies.Any( p => p.StartsWith( invocationPath ) ) ) { dependency.Dependencies.Add( invocationPath ); } return this; }