Ejemplo n.º 1
0
 public ServiceClassUser(IUnityContainer unityContainer, String name, String title, String hostName, int port)
 {
     _container = unityContainer;
     _associationFactory = _container.Resolve<AssociationFactory>();
     _dcmObjectFactory = _container.Resolve<DcmObjectFactory>();
     _dcmParserFactory = _container.Resolve<DcmParserFactory>();
     _aAssociateRequest = _associationFactory.NewAAssociateRQ();
     SetUpForOperation(name, title, hostName, port);
     var timer = new Timer(10 * 60 * 1000);
     timer.Elapsed += ClearCache;
     timer.Start();
 }
 public void SetUp()
 {
     mockRepository = new MockRepository();
     unityContainer = new UnityContainer();
     associationFactory = mockRepository.DynamicMock<AssociationFactory>();
     unityContainer.RegisterInstance(associationFactory);
     dcmObjectFactory = mockRepository.DynamicMock<DcmObjectFactory>();
     unityContainer.RegisterInstance(dcmObjectFactory);
     unityContainer.RegisterInstance(mockRepository.DynamicMock<DcmParserFactory>());
     aAssociateRequest = CreateAAssociateRq();
 }