public TestBizDecode() { var utData = new NonDiBizSetup(new GenericBizRunnerConfig { TurnOffCaching = true }); _wrappedConfig = utData.WrappedConfig; }
public TestGetDtoAndResetDtoAsync() { var config = new GenericBizRunnerConfig { TurnOffCaching = true }; var utData = new NonDiBizSetup(config); _wrappedConfig = utData.WrappedConfig; }
public TestActionServiceInOut() { var config = new GenericBizRunnerConfig { TurnOffCaching = true }; var utData = NonDiBizSetup.SetupDtoMapping <ServiceLayerBizInDto>(config); utData.AddDtoMapping <ServiceLayerBizOutDto>(); _wrappedConfig = utData.WrappedConfig; }
public ActionServiceInOutAsync(bool requiresSaveChanges, IWrappedBizRunnerConfigAndMappings wrappedConfig) : base(requiresSaveChanges, wrappedConfig) { }
protected ActionServiceBase(bool requiresSaveChanges, IWrappedBizRunnerConfigAndMappings wrappedConfig) { RequiresSaveChanges = requiresSaveChanges; WrappedConfig = wrappedConfig; }
/// <inheritdoc /> public ActionServiceAsync(DbContext context, TBizInstance bizInstance, IWrappedBizRunnerConfigAndMappings wrappedConfig) : base(context, bizInstance, wrappedConfig) { }
/// <inheritdoc /> public ActionService(IRepository repository, TBizInstance bizInstance, IWrappedBizRunnerConfigAndMappings wrappedConfig) : base(repository, bizInstance, wrappedConfig) { }
/// <summary> /// This is the instance that can be called to run the service /// </summary> public dynamic GetServiceInstance(IWrappedBizRunnerConfigAndMappings wrappedConfig) { return(_bizInstance ?? (_bizInstance = CreateRequiredServiceInstance(_matchingServiceType, _iBizType, _extractedActionInterface, wrappedConfig))); }
//--------------------------------------------------- //private methods private dynamic CreateRequiredServiceInstance(ServiceBuilderLookup serviceBaseInfo, Type iBizType, Type genericInterfacePart, IWrappedBizRunnerConfigAndMappings wrappedConfig) { var genericAgruments = genericInterfacePart.GetGenericArguments().ToList(); genericAgruments.Insert(0, iBizType); return(Activator.CreateInstance( serviceBaseInfo.ServiceHandleType.MakeGenericType(genericAgruments.ToArray()), new object[] { RequiresSaveChanges, wrappedConfig })); }