public ScoringAssessmentsServiceV3(ICacheStore cache, IDomainServiceProvider domainServiceProvider, IOdsApiClientProvider odsApiClientProvider, IOdsApiSettingsProvider odsApiSettingsProvider) { _cache = cache; _domainServiceProvider = domainServiceProvider; _odsApiClientProvider = odsApiClientProvider; _odsApiSettingsProvider = odsApiSettingsProvider; }
public DasyncCoHost( ICommunicationModelProvider communicationModelProvider, IDomainServiceProvider domainServiceProvider) { _communicationModelProvider = communicationModelProvider; _domainServiceProvider = domainServiceProvider; }
public ServiceReference(IDomainServiceProvider domainServiceProvider, ServiceId serviceId, IServiceDefinition serviceDefinition) { _domainServiceProvider = domainServiceProvider; Id = serviceId; Definition = serviceDefinition; }
public UserRoleAuthorizationFilter(IDomainServiceProvider domainServiceProvider, ISessionContext sessionContext, IUserRoleMappingsFacade userRoleMappingsFacade, UserRole[] userRoles) { _domainServiceProvider = domainServiceProvider; _sessionContext = sessionContext; _userRoleMappingsFacade = userRoleMappingsFacade; _userRoles = userRoles; }
public HttpRequestHandler( ICommunicationModelProvider communicationModelProvider, IDomainServiceProvider domainServiceProvider, IRoutineMethodResolver routineMethodResolver, IMethodInvokerFactory methodInvokerFactory, ISerializerFactorySelector serializerFactorySelector, IEnumerable <IEventDispatcher> eventDispatchers, IUniqueIdGenerator idGenerator, ITransitionCommitter transitionCommitter, IRoutineCompletionNotifier routineCompletionNotifier, IEnumerable <IHttpIntentPreprocessor> intentPreprocessors, IEnumerable <IRoutineTransitionAction> transitionActions, ITransitionUserContext transitionUserContext) { _communicationModelProvider = communicationModelProvider; _domainServiceProvider = domainServiceProvider; _routineMethodResolver = routineMethodResolver; _methodInvokerFactory = methodInvokerFactory; _eventDispatcher = eventDispatchers.FirstOrDefault(); _idGenerator = idGenerator; _transitionCommitter = transitionCommitter; _routineCompletionNotifier = routineCompletionNotifier; _intentPreprocessor = new AggregateHttpIntentPreprocessor(intentPreprocessors); _transitionActions = transitionActions; _transitionUserContext = transitionUserContext; _dasyncJsonSerializer = serializerFactorySelector.Select("dasync+json").Create(); JsonSettings.Converters.Add(new EntityProjectionConverter(communicationModelProvider.Model)); }
public MeServiceV3(ICacheStore cache, IDomainServiceProvider domainServiceProvider, IOdsApiClientProvider odsApiClientProvider, IUserRoleMappingsFacade userRoleMappingsProvider, ISessionContext sessionContext) { _cache = cache; _domainServiceProvider = domainServiceProvider; _odsApiClientProvider = odsApiClientProvider; _userRoleMappingsProvider = userRoleMappingsProvider; _sessionContext = sessionContext; }
/// <summary> /// 移除领域扩展。(最终判定) /// </summary> /// <typeparam name="TService"></typeparam> /// <typeparam name="TExtension"></typeparam> /// <param name="domainProvider"></param> public static void RemoveExtension <TService, TExtension>(this IDomainServiceProvider domainProvider) { if (domainProvider == null) { throw new ArgumentNullException(nameof(domainProvider)); } domainProvider.AddExtensionFilter((service, extension) => service == typeof(TService) && extension == typeof(TExtension) ? false : true); }
public StartupHostedService( ICommunicationModel communicationModel, IDomainServiceProvider domainServiceProvider, ICommunicationListener communicationListener) { _communicationModel = communicationModel; _domainServiceProvider = domainServiceProvider; _communicationListener = communicationListener; }
/// <summary> /// 添加领域泛型扩展。 /// </summary> /// <param name="domainProvider">领域服务提供器。</param> /// <param name="serviceDefinitionType">领域服务泛型定义类型。</param> /// <param name="extensionDefinitionType">领域扩展泛型定义类型。</param> public static void AddGenericDefinitionExtension(this IDomainServiceProvider domainProvider, Type serviceDefinitionType, Type extensionDefinitionType) { if (domainProvider == null) { throw new ArgumentNullException(nameof(domainProvider)); } if (!typeof(IDomainService).IsAssignableFrom(serviceDefinitionType)) { throw new ArgumentException("不是领域服务类型。", nameof(serviceDefinitionType)); } if (!typeof(IDomainExtension).IsAssignableFrom(extensionDefinitionType)) { throw new ArgumentException("不是领域扩展类型。", nameof(serviceDefinitionType)); } if (!serviceDefinitionType.GetTypeInfo().IsGenericTypeDefinition) { throw new ArgumentException("仅支持泛型定义类型。。", nameof(serviceDefinitionType)); } if (!extensionDefinitionType.GetTypeInfo().IsGenericTypeDefinition) { throw new ArgumentException("仅支持泛型定义类型。。", nameof(extensionDefinitionType)); } var serviceConstraints = serviceDefinitionType.GetTypeInfo().GenericTypeParameters; var extensionConstraints = extensionDefinitionType.GetTypeInfo().GenericTypeParameters; if (serviceConstraints.Length != extensionConstraints.Length) { throw new ArgumentException("领域服务类型与领域扩展类型的泛型数量不一致。"); } //for (int i = 0; i < serviceConstraints.Length; i++) //{ // if (extensionConstraints[i].GetTypeInfo().GetGenericParameterConstraints().Any(t => !t.IsAssignableFrom(serviceConstraints[i]))) // throw new ArgumentException("领域服务第" + i + "个泛型约束不满足领域扩展泛型约束。"); //} domainProvider.AddExtensionSelector(type => { if (!type.GetTypeInfo().IsGenericType) { return(null); } if (type.GetGenericTypeDefinition() != serviceDefinitionType) { return(null); } try { var extensionType = extensionDefinitionType.MakeGenericType(type.GetGenericArguments()); return(extensionType); } catch { return(null); } }); }
public ServiceProxyBuilder( ICommunicationModelProvider communicationModelProvider, IProxyTypeBuilder proxyTypeBuilder, IProxyMethodExecutor proxyMethodExecutor, IDomainServiceProvider domainServiceProvider, ISerializedServiceProxyBuilder holder) { ((SerializedServiceProxyBuilderHolder)holder).Builder = this; _communicationModelProvider = communicationModelProvider; _proxyTypeBuilder = proxyTypeBuilder; _proxyMethodExecutor = proxyMethodExecutor; _domainServiceProvider = domainServiceProvider; }
public TransitionCommitter( ICommunicationModelProvider communicationModelProvider, IPlatformHttpClientProvider platformHttpClientProvider, IRoutineCompletionSink routineCompletionSink, IEventDispatcher eventDispatcher, IRoutineMethodResolver routineMethodResolver, IDomainServiceProvider domainServiceProvider, IMethodInvokerFactory methodInvokerFactory, IEnumerable <IRoutineTransitionAction> transitionActions, ITransitionUserContext transitionUserContext) { _communicationModelProvider = communicationModelProvider; _platformHttpClientProvider = platformHttpClientProvider; _routineCompletionSink = routineCompletionSink; _eventDispatcher = eventDispatcher; _routineMethodResolver = routineMethodResolver; _domainServiceProvider = domainServiceProvider; _methodInvokerFactory = methodInvokerFactory; _transitionActions = transitionActions; _transitionUserContext = transitionUserContext; }
/// <summary> /// 添加领域扩展。 /// </summary> /// <param name="domainProvider">领域服务提供器。</param> /// <param name="serviceType">领域服务类型。(支持子类绑定。)</param> /// <param name="extensionType">领域扩展类型。</param> public static void AddExtension(this IDomainServiceProvider domainProvider, Type serviceType, Type extensionType) { if (domainProvider == null) { throw new ArgumentNullException(nameof(domainProvider)); } if (!typeof(IDomainService).IsAssignableFrom(serviceType)) { throw new ArgumentException("不是领域服务类型。", nameof(serviceType)); } if (!typeof(IDomainExtension).IsAssignableFrom(extensionType)) { throw new ArgumentException("不是领域扩展类型。", nameof(serviceType)); } if (serviceType.GetTypeInfo().IsGenericTypeDefinition) { throw new ArgumentException("不支持泛型定义类型。。", nameof(serviceType)); } if (extensionType.GetTypeInfo().IsGenericTypeDefinition) { throw new ArgumentException("不支持泛型定义类型。。", nameof(extensionType)); } domainProvider.AddExtensionSelector(t => serviceType.IsAssignableFrom(t) ? extensionType : null); }
public static void AddForumExtensions(this IDomainServiceProvider provider) { provider.AddExtension <ForumDomainService, PagerExtension>(); }
public CatalogController(IDomainServiceProvider domainServiceProvider) { _domainServiceProvider = domainServiceProvider; }
/// <summary> /// 添加领域扩展。 /// </summary> /// <typeparam name="TService">领域服务类型。(支持子类绑定。)</typeparam> /// <typeparam name="TExtension">领域扩展类型。</typeparam> /// <param name="domainProvider">领域服务提供器。</param> public static void AddExtension <TService, TExtension>(this IDomainServiceProvider domainProvider) where TService : IDomainService where TExtension : IDomainExtension { AddExtension(domainProvider, typeof(TService), typeof(TExtension)); }
public MeController(IDomainServiceProvider domainServiceProvider, ISessionContext sessionContext) { _domainServiceProvider = domainServiceProvider; _sessionContext = sessionContext; }
public CatalogServiceV3(IDomainServiceProvider domainServiceProvider, IOdsApiClientProvider odsApiClientProvider) { _domainServiceProvider = domainServiceProvider; _odsApiClientProvider = odsApiClientProvider; }
public static void AddForumExtensions(this IDomainServiceProvider provider) { provider.AddGenericDefinitionExtension(typeof(EntityDomainService <>), typeof(ThreadDomainExtension <>)); provider.AddGenericDefinitionExtension(typeof(EntityDomainService <>), typeof(PostDomainExtension <>)); }
public CacheController(ICacheStore cacheProvider, ICacheService service, IDomainServiceProvider domainServiceProvider) { _cacheProvider = cacheProvider; _cacheService = service; _domainServiceProvider = domainServiceProvider; }
public override void OnActionExecuting(ActionExecutingContext context) { DomainProvider = HttpContext.RequestServices.GetRequiredService <IDomainServiceProvider>(); }
/// <summary> /// Creates a new instance of <see cref="DomainContextFactory"/> /// </summary> public DomainContextFactory(IDomainServiceProvider domainServiceProvider) { DomainServiceProvider = domainServiceProvider; }
public DescriptorController(IDomainServiceProvider domainServiceProvider) { _domainServiceProvider = domainServiceProvider; }
public ScoringInterventionsServiceV2(ICacheStore cacheProvider, IDomainServiceProvider domainServiceProvider, IOdsApiClientProvider odsApiClientProvider) { _cacheProvider = cacheProvider; _domainServiceProvider = domainServiceProvider; _odsApiClientProvider = odsApiClientProvider; }
protected virtual void ConfigureDomainService(IDomainServiceProvider domainProvider) { }
public InterventionController(IDomainServiceProvider domainServiceProvider) { _domainServiceProvider = domainServiceProvider; }
public CacheService(ICacheStore cache, IDomainServiceProvider domainServiceProvider) { _cache = cache; _domainServiceProvider = domainServiceProvider; }
public AssessmentController(IDomainServiceProvider domainServiceProvider) { _domainServiceProvider = domainServiceProvider; }
public TypesController(IDomainServiceProvider domainServiceProvider) { _domainServiceProvider = domainServiceProvider; }
public ServiceResolver(ICommunicationModel communicationModel, IDomainServiceProvider domainServiceProvider) { _communicationModel = communicationModel; _domainServiceProvider = domainServiceProvider; }
public StudentServiceV3(IDomainServiceProvider domainServiceProvider, IOdsApiClientProvider odsApiClientProvider) { _domainServiceProvider = domainServiceProvider; _odsApiClientProvider = odsApiClientProvider; }