This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// HttpModule is the better choice for session management, because when more than one controller is involved within one webrequest, | |
/// the session will be disposed by one controller and the other controller can not reuse the session, because it is already disposed | |
/// </summary> | |
public class UnitOfWorkHttpModule : IHttpModule | |
{ | |
/// <summary> | |
/// Should be refactored to use constructor injection | |
/// http://bugsquash.blogspot.de/2009/11/windsor-managed-httpmodules.html | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main() | |
{ | |
ObjectFactory.Initialize(x => | |
{ | |
x.For<IExecuter>().Use<Executer>(); | |
x.For<IService>().Use<Service>(); | |
x.For<Func<Data, IExecuter>>().Use(data => ObjectFactory.With(data.GetType(), data).GetInstance<IExecuter>()); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Subject(typeof(Presenter<>))] | |
public class When_disposing_a_presenter | |
{ | |
static IUnitOfWork UnitOfWork; | |
static Presenter<IView> Presenter; | |
static IView View; | |
Establish context = () => | |
{ | |
UnitOfWork = A.Fake<IUnitOfWork>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainViewPresenter : Presenter<IMainView> | |
{ | |
private readonly IArticleRepository _articlesRepository; | |
private readonly IUnitOfWork _unitOfWork; | |
private readonly IPresenterFactory _presenterFactory; | |
public MainViewPresenter(IMainView view, IArticleRepository articlesRepository, IUnitOfWork unitOfWork, IPresenterFactory presenterFactory) | |
: base(view) | |
{ | |
_articlesRepository = articlesRepository; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nicht funktionierender Aufruf: | |
C:\TFS_BDD_TestingFramework\Machine.Specifications-Release\mspec-clr4.exe --xml "\\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\results.xml" --html "\\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81" " \\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\Release\ImportServerTests.dll" | |
Ergebnis: | |
Could not load file or assembly 'file:///\\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\Release\ImportServerTests.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) | |
funktionierender Aufruf: | |
C:\TFS_BDD_TestingFramework\Machine.Specifications-Release\mspec-clr4.exe --xml "C:\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\results.xml" --html "C:\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81" " C: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UnitOfWork : IUnitOfWork | |
{ | |
private ObjectContext _db; | |
public UnitOfWork(ObjectContext db) | |
{ | |
_db = db; | |
} | |
public void Commit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Subject(typeof(Bootstrapper))] | |
public class When_injecting_unit_of_work_and_repositories_and_parameter_config_in_a_consumer | |
{ | |
class ConsumerForTest | |
{ | |
private readonly IUnitOfWork _unitOfWork; | |
private readonly IRepository<PosDevice> _posDeviceRepository; | |
private readonly IRepository<Store> _storeRepository; | |
private readonly ParameterConfig _parameterConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FormFactory : IFormFactory | |
{ | |
private readonly Func<Type, object, Form> _createFormWithRuntimeParam; | |
public FormFactory(Func<Type, object, Form> createFormWithRuntimeParam) | |
{ | |
_createFormWithRuntimeParam = createFormWithRuntimeParam; | |
} | |
public TForm CreateForm<TForm>() where TForm : Form |
NewerOlder