コード例 #1
0
 protected override IEnumerable <ServiceCompositeModel> FindSuitableModels(SPI.Model.CompositeModel compositeModel, SPI.Model.AbstractInjectableModel model, Attribute scope, Type targetType, Type serviceType)
 {
     return(LayeredApplicationModelUtils.SearchVisibleModels(
                sModel => sModel.ModelType.Equals(CompositeModelType.SERVICE) && sModel.PublicTypes.Any(pType => serviceType.IsAssignableFrom_IgnoreGenericArgumentsForGenericTypes(pType)),
                (moduleModel, cModel) => cModel,
                ((LayeredApplicationModel)compositeModel.ApplicationModel).FindModuleModel(compositeModel)
                ).Cast <ServiceCompositeModel>());
     //var matchingModel = LayeredApplicationModelUtils.FindFirstVisibleCompositeModel( ( (LayeredApplicationModel) compositeModel.ApplicationModel ).FindModuleModel( compositeModel ), CompositeModelType.SERVICE, serviceType );
     //return new ValidationResult( matchingModel != null, "The service of type " + serviceType + " is either not present or not visible." );
 }
コード例 #2
0
 protected virtual Boolean ValidateNonStandardInjection(SPI.Model.CompositeModel compositeModel, SPI.Model.AbstractInjectableModel model, Attribute scope, Type targetType)
 {
     return(false);
 }
コード例 #3
0
 protected abstract IEnumerable <ServiceCompositeModel> FindSuitableModels(SPI.Model.CompositeModel compositeModel, SPI.Model.AbstractInjectableModel model, Attribute scope, Type targetType, Type serviceType);
コード例 #4
0
 protected override void PostValidateModel(SPI.Model.CompositeModel compositeModel, CompositeValidationResult validationResult)
 {
     // Nothing to do.
 }