public void HasDependency(Type dataType, string scopeName) { if (DataDependencies == null) { DataDependencies = new List <IDataDependency>(); } DataDependencies.Add(_dataDependencyFactory.Create(dataType, scopeName)); }
IDataProviderDefinition IDataProviderDefinition.Provides( Type dataType, Action <IRenderContext, IDataContext, IDataDependency> action, string scope) { if (action == null) { _dataProvider.Add(dataType, scope); } else { var dataDependency = _dataDependencyFactory.Create(dataType, scope); var dataSupplier = (IDataSupplier)_dataProvider; dataSupplier.Add(dataDependency, action); } return(this); }
private void Configure(AttributeSet attributes, IDataSupplier dataSupplier) { if (dataSupplier == null) { return; } if (attributes.SuppliesDatas != null) { foreach (var data in attributes.SuppliesDatas) { var dependency = _dataDependencyFactory.Create( data.DataType, data.Scope); // TODO: Is there a way to specify the action via attributes? dataSupplier.Add(dependency, (rc, dc, dep) => { }); } } }