Beispiel #1
0
        public void SetUp()
        {
            threadingPolicy = new SingleThreadingPolicy();
            transactionFactory = new TransactionFactory(threadingPolicy);

            layer = MockRepository.GenerateMock<ILayer>();

            serverManager = MockRepository.GenerateMock<IServerManager>();

            serverManagerFactory = MockRepository.GenerateMock<IServerManagerFactory>();

            operationFactory = new OperationFactory(layer, serverManagerFactory);

            sut = new Deployer(transactionFactory, operationFactory);

            project = new Project
            {
                Name = "Search.API",
                Source = @"\\ystage01.ywebfarm.lcl\e$\ServiceArtifacts\Yoox.API\Search.API\1.1_new",
                Path = @"Test\Yoox.API\Search.API\1.0",
                Application = "Search.API",
                Site = "Yoox.API",
                Servers = new[] { @"\\serverA\", @"\\serverB\" },
            };
        }
 public MemcachedServerPool(IOperationFactory opFactory)
 {
     if (configuration == null) {
         throw new ArgumentNullException("NoConfig");
     }
     this.configuration = ConfigurationProvider.Instance.CurConfig;
     this.opFactory = opFactory;
     //this.deadTimeoutMsec = (long)this.configuration.SocketPool.DeadTimeout.TotalMilliseconds;
 }
		public DefaultServerPool(IMemcachedClientConfiguration configuration, IOperationFactory opFactory)
		{
			if (configuration == null) throw new ArgumentNullException("socketConfig");
			if (opFactory == null) throw new ArgumentNullException("opFactory");

			this.configuration = configuration;
			this.factory = opFactory;

			this.deadTimeoutMsec = (long)this.configuration.SocketPool.DeadTimeout.TotalMilliseconds;
		}
Beispiel #4
0
 public AutoSave(IOperationFactory operationFactory, IFormFactory formFactory, PdfSettingsContainer pdfSettingsContainer, IUserConfigManager userConfigManager, IErrorOutput errorOutput, AppConfigManager appConfigManager, FileNamePlaceholders fileNamePlaceholders)
 {
     this.operationFactory = operationFactory;
     this.formFactory = formFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.userConfigManager = userConfigManager;
     this.errorOutput = errorOutput;
     this.appConfigManager = appConfigManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
 }
Beispiel #5
0
 public BatchState(IScanPerformer scanPerformer, IProfileManager profileManager, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOperationFactory operationFactory, PdfSettingsContainer pdfSettingsContainer, UserConfigManager userConfigManager, IFormFactory formFactory)
 {
     this.scanPerformer = scanPerformer;
     this.profileManager = profileManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter = pdfExporter;
     this.operationFactory = operationFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.userConfigManager = userConfigManager;
     this.formFactory = formFactory;
 }
    public WindowsAzureServerPool(string memcachedRoleName, string memcachedEndpointName, IMemcachedClientConfiguration configuration, IOperationFactory opFactory)
    {
        this.memcachedRoleName = memcachedRoleName;
        this.memcachedEndpointName = memcachedEndpointName;
        configuration = configuration ?? new MemcachedClientConfiguration();
        if (opFactory == null) throw new ArgumentNullException("opFactory");

        nodes = new Dictionary<string, IMemcachedNode>();

        this.configuration = configuration;
        this.factory = opFactory;
    }
Beispiel #7
0
 public AutomatedScanning(AutomatedScanningOptions options, IProfileManager profileManager, IScanPerformer scanPerformer, IErrorOutput errorOutput, IEmailer emailer, IScannedImageImporter scannedImageImporter, IUserConfigManager userConfigManager, PdfSettingsContainer pdfSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOperationFactory operationFactory)
 {
     this.options = options;
     this.profileManager = profileManager;
     this.scanPerformer = scanPerformer;
     this.errorOutput = errorOutput;
     this.emailer = emailer;
     this.scannedImageImporter = scannedImageImporter;
     this.userConfigManager = userConfigManager;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.imageSettingsContainer = imageSettingsContainer;
     this.operationFactory = operationFactory;
 }
Beispiel #8
0
 protected BiochemistryTest(IOperationFactory operationFactory) : base(operationFactory)
 {
 }
Beispiel #9
0
 public static System.Threading.Tasks.Task <Int64> Run(IOperationFactory __m__, Int64 nQubits)
 {
     return(__m__.Run <NIterations, Int64, Int64>(nQubits));
 }
Beispiel #10
0
 public GenerateRandomBit(IOperationFactory m) : base(m)
 {
 }
Beispiel #11
0
 protected Test(IOperationFactory operationFactory)
 {
     this.operationFactory = operationFactory;
 }
Beispiel #12
0
 public static System.Threading.Tasks.Task <QVoid> Run(IOperationFactory __m__)
 {
     return(__m__.Run <HelloQ, QVoid, QVoid>(QVoid.Instance));
 }
Beispiel #13
0
 protected ViewModelBase([NotNull] IOperationFactory operationFactory)
 {
     _operationFactory = operationFactory ?? throw new ArgumentNullException(nameof(operationFactory));
 }
Beispiel #14
0
 public Native(IOperationFactory m) : base(m)
 {
     this.Simulator = m as QuantumSimulator;
 }
Beispiel #15
0
 public static System.Threading.Tasks.Task <IQArray <Result> > Run(IOperationFactory __m__, Int64 nQubits)
 {
     return(__m__.Run <SearchForMarkedInput, Int64, IQArray <Result> >(nQubits));
 }
 public MeasureQubit(IOperationFactory m) : base(m)
 {
 }
Beispiel #17
0
 public Adjointable(IOperationFactory m) : base(m)
 {
 }
 public SayHello(IOperationFactory m) : base(m)
 {
 }
Beispiel #19
0
 public Teleportation(IOperationFactory m) : base(m)
 {
 }
Beispiel #20
0
 public FileProvider(IOperationFactory operationFactory)
 {
     _operationFactory = operationFactory;
 }
Beispiel #21
0
 public SearchForMarkedInput(IOperationFactory m) : base(m)
 {
 }
 public Native(IOperationFactory m)
     : base(m)
 {
 }
 public static IEnumerable <Operation> GetOperations(this IEnumerable <OperationEvent> operationEvents, IOperationFactory <OperationEvent> factory)
 {
     foreach (var operationEvent in operationEvents)
     {
         yield return(factory.CreateOperation(operationEvent));
     }
 }
Beispiel #24
0
 public PrepareState1(IOperationFactory m) : base(m)
 {
 }
Beispiel #25
0
 public static System.Threading.Tasks.Task <Result> Run(IOperationFactory __m__)
 {
     return(__m__.Run <GenerateRandomBit, QVoid, Result>(QVoid.Instance));
 }
Beispiel #26
0
 public Native(IOperationFactory m) : base(m)
 {
     Simulator = m as SimulatorBase;
 }
Beispiel #27
0
 public Operation(IOperationFactory m) : base(m)
 {
 }
Beispiel #28
0
 public Calculator(IOperationFactory operationFactory)
 {
     _operationFactory = operationFactory;
 }
Beispiel #29
0
 public Deployer(ITransactionFactory transactionFactory, IOperationFactory operationFactory)
 {
     this.transactionFactory = transactionFactory;
     this.operationFactory = operationFactory;
 }
Beispiel #30
0
 public HelloQ(IOperationFactory m) : base(m)
 {
 }
 public ResultsService(IResultRepository resultRepository, IOperationFactory operationFactory)
 {
     _resultRepository = resultRepository ?? throw new ArgumentNullException(nameof(resultRepository));
     _operationFactory = operationFactory ?? throw new ArgumentNullException(nameof(operationFactory));
 }
Beispiel #32
0
 /// <summary>
 /// What we are performing here is basically a constructor dependency injection.
 /// Calculator depends on <see cref="IOperationFactory"/> and instead of creating
 /// the instance itself, the <see cref="Container"/> does so.
 /// </summary>
 /// <param name="factory"></param>
 public Calculator(IOperationFactory factory)
 {
     _factory = factory;
 }
Beispiel #33
0
 public NIterations(IOperationFactory m) : base(m)
 {
 }
Beispiel #34
0
        public FDesktop(IEmailer emailer, StringWrapper stringWrapper, AppConfigManager appConfigManager, RecoveryManager recoveryManager, IScannedImageImporter scannedImageImporter, AutoUpdaterUI autoUpdaterUI, OcrDependencyManager ocrDependencyManager, IProfileManager profileManager, IScanPerformer scanPerformer, IScannedImagePrinter scannedImagePrinter, ChangeTracker changeTracker, EmailSettingsContainer emailSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, PdfSettingsContainer pdfSettingsContainer, StillImage stillImage, IOperationFactory operationFactory, IUserConfigManager userConfigManager, IScannedImageFactory scannedImageFactory)
        {
            this.emailer = emailer;
            this.stringWrapper = stringWrapper;
            this.appConfigManager = appConfigManager;
            this.recoveryManager = recoveryManager;
            this.scannedImageImporter = scannedImageImporter;
            this.autoUpdaterUI = autoUpdaterUI;
            this.ocrDependencyManager = ocrDependencyManager;
            this.profileManager = profileManager;
            this.scanPerformer = scanPerformer;
            this.scannedImagePrinter = scannedImagePrinter;
            this.changeTracker = changeTracker;
            this.emailSettingsContainer = emailSettingsContainer;
            this.fileNamePlaceholders = fileNamePlaceholders;
            this.imageSettingsContainer = imageSettingsContainer;
            this.pdfSettingsContainer = pdfSettingsContainer;
            this.stillImage = stillImage;
            this.operationFactory = operationFactory;
            this.userConfigManager = userConfigManager;
            this.scannedImageFactory = scannedImageFactory;
            InitializeComponent();

            Shown += FDesktop_Shown;
            FormClosing += FDesktop_FormClosing;
            Closed += FDesktop_Closed;
        }
 public LikeX(IOperationFactory m) : base(m)
 {
 }
Beispiel #36
0
 public static System.Threading.Tasks.Task <Int64> Run(IOperationFactory __m__, Int64 max)
 {
     return(__m__.Run <SampleRandomNumberInRange, Int64, Int64>(max));
 }
 public DependsOnGen(IOperationFactory m) : base(m)
 {
 }
Beispiel #38
0
 public SampleRandomNumber(IOperationFactory m) : base(m)
 {
 }
Beispiel #39
0
 public static System.Threading.Tasks.Task <Int64> Run(IOperationFactory __m__)
 {
     return(__m__.Run <SampleRandomNumber, QVoid, Int64>(QVoid.Instance));
 }
 /// <summary>
 /// What we are performing here is basically a constructor dependency injection.
 /// Calculator depends on <see cref="IOperationFactory"/> and instead of creating
 /// the instance itself, the <see cref="Container"/> does so.
 /// </summary>
 /// <param name="factory"></param>
 public Calculator(IOperationFactory factory)
 {
     _factory = factory;
 }
Beispiel #41
0
        public FDesktop(IEmailer emailer, StringWrapper stringWrapper, AppConfigManager appConfigManager, RecoveryManager recoveryManager, IScannedImageImporter scannedImageImporter, OcrDependencyManager ocrDependencyManager, IProfileManager profileManager, IScanPerformer scanPerformer, IScannedImagePrinter scannedImagePrinter, ChangeTracker changeTracker, EmailSettingsContainer emailSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, PdfSettingsContainer pdfSettingsContainer, StillImage stillImage, IOperationFactory operationFactory, IUserConfigManager userConfigManager, KeyboardShortcutManager ksm, ThumbnailRenderer thumbnailRenderer, DialogHelper dialogHelper)
        {
            this.emailer = emailer;
            this.stringWrapper = stringWrapper;
            this.appConfigManager = appConfigManager;
            this.recoveryManager = recoveryManager;
            this.scannedImageImporter = scannedImageImporter;
            this.ocrDependencyManager = ocrDependencyManager;
            this.profileManager = profileManager;
            this.scanPerformer = scanPerformer;
            this.scannedImagePrinter = scannedImagePrinter;
            this.changeTracker = changeTracker;
            this.emailSettingsContainer = emailSettingsContainer;
            this.fileNamePlaceholders = fileNamePlaceholders;
            this.imageSettingsContainer = imageSettingsContainer;
            this.pdfSettingsContainer = pdfSettingsContainer;
            this.stillImage = stillImage;
            this.operationFactory = operationFactory;
            this.userConfigManager = userConfigManager;
            this.ksm = ksm;
            this.thumbnailRenderer = thumbnailRenderer;
            this.dialogHelper = dialogHelper;
            InitializeComponent();

            Shown += FDesktop_Shown;
            FormClosing += FDesktop_FormClosing;
            Closed += FDesktop_Closed;
        }