コード例 #1
0
 public FascicoloImmobiliareService(IProtocolloService protocolloService, IDocumentService documentService, IArchiviazioneOtticaService archiviazioneOtticaService, IDaoFactory daoFactory)
 {
     _protocolloService = protocolloService;
     _documentService = documentService;
     _archiviazioneOtticaService = archiviazioneOtticaService;
     _daoFactory = daoFactory;
 }
コード例 #2
0
 public AssociateController(
     IMembershipService membershipService,
     IMembershipService associateMembershipService,
     IAssociateService associateService,
     IDocumentService documentService,
     IReferenceService referenceService,
     IEmployeeService employeeService,
     IProspectService prospectService,
     IPrincipal user,
     IClientProjectSharedService clientProjectSharedService,
     IIndividualService individualService,
     IRoleService roleService,
     Admin.Services.IEmailService emailService)
     : base(membershipService, associateService, user)
 {
     this.associateService = associateService;
     this.documentService = documentService;
     this.referenceService = referenceService;
     this.employeeService = employeeService;
     this.prospectService = prospectService;
     this.associateMembershipService = associateMembershipService;
     this.clientProjectSharedService = clientProjectSharedService;
     this.individualService = individualService;
     this.roleService = roleService;
     this.emailService = emailService;
 }
コード例 #3
0
ファイル: Editor.cs プロジェクト: vincenthamm/ATF
        public Editor(
            ICommandService commandService,
            IControlHostService controlHostService,
            IDocumentService documentService,
            IDocumentRegistry documentRegistry,
            IFileDialogService fileDialogService
            )
        {
            m_commandService = commandService;
            m_controlHostService = controlHostService;
            m_documentService = documentService;
            m_documentRegistry = documentRegistry;
            m_fileDialogService = fileDialogService;

            // create a document client for each file type
            m_txtDocumentClient = new DocumentClient(this, ".txt");
            m_csDocumentClient = new DocumentClient(this, ".cs");
            m_luaDocumentClient = new DocumentClient(this, ".lua");
            m_nutDocumentClient = new DocumentClient(this, ".nut");
            m_pyDocumentClient = new DocumentClient(this, ".py");
            m_xmlDocumentClient = new DocumentClient(this, ".xml");
            m_daeDocumentClient = new DocumentClient(this, ".dae");
            m_cgDocumentClient = new DocumentClient(this, ".cg");

        }
コード例 #4
0
ファイル: Editor.cs プロジェクト: Joxx0r/ATF
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            PrototypeLister prototypeLister,
            SchemaLoader schemaLoader,
            DiagramTheme diagramTheme)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_documentService = documentService;
            m_prototypeLister = prototypeLister;

            m_schemaLoader = schemaLoader;

            m_theme = new D2dDiagramTheme();
            m_fsmRenderer = new D2dDigraphRenderer<State, Transition>(m_theme);

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\FsmEditor\\data");
            EditorInfo.InitialDirectory = initialDirectory;
        }
コード例 #5
0
 public ProductServiceTests()
 {
     _documentService = A.Fake<IDocumentService>();
     _siteSettings = new SiteSettings() { DefaultPageSize = 10 };
     _uniquePageService = A.Fake<IUniquePageService>();
     _productService = new ProductService(Session, _documentService, _siteSettings, _uniquePageService);
 }
コード例 #6
0
ファイル: Editor.cs プロジェクト: vincenthamm/ATF
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            PrototypeLister prototypeLister,
            LayerLister layerLister,
            SchemaLoader schemaLoader)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_documentService = documentService;
            m_prototypeLister = prototypeLister;
            m_layerLister = layerLister;
            
            m_schemaLoader = schemaLoader;

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\CircuitEditor\\data");
            EditorInfo.InitialDirectory = initialDirectory;
            m_theme = new D2dDiagramTheme();
            m_circuitRenderer = new D2dCircuitRenderer<Module, Connection, ICircuitPin>(m_theme, documentRegistry);
            m_subGraphRenderer = new D2dSubCircuitRenderer<Module, Connection, ICircuitPin>(m_theme);

            // create d2dcontrol for displaying sub-circuit            
            m_d2dHoverControl = new D2dAdaptableControl();
            m_d2dHoverControl.Dock = DockStyle.Fill;
            var xformAdapter = new TransformAdapter();
            xformAdapter.EnforceConstraints = false;//to allow the canvas to be panned to view negative coordinates
            m_d2dHoverControl.Adapt(xformAdapter, new D2dGraphAdapter<Module, Connection, ICircuitPin>(m_circuitRenderer, xformAdapter));
            m_d2dHoverControl.DrawingD2d += new EventHandler(m_d2dHoverControl_DrawingD2d);
        }
コード例 #7
0
 public CommandLineArgsService(
     IDocumentRegistry documentRegistry,
     IDocumentService documentService)
 {
     m_documentRegistry = documentRegistry;
     m_documentService = documentService;
 }
コード例 #8
0
 public MediaCategoryControllerTests()
 {
     _documentService = A.Fake<IDocumentService>();
     _fileService = A.Fake<IFileAdminService>();
     _urlValidationService = A.Fake<IUrlValidationService>();
     _mediaCategoryController = new MediaCategoryController(_fileService, _urlValidationService, _documentService);
 }
コード例 #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CurrentDocumentSearchScope"/> class.
        /// </summary>
        /// <param name="documentService">The document service.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="documentService"/> is <see langword="null"/>.
        /// </exception>
        public CurrentDocumentSearchScope(IDocumentService documentService)
        {
            if (documentService == null)
                throw new ArgumentNullException(nameof(documentService));

            _documentService = documentService;
        }
コード例 #10
0
 public AllDocumentsViewModel(IDocumentService service, IEventAggregator eventAggregator)
 {
     this.service = service;
     this.eventAggregator = eventAggregator;
     eventAggregator.GetEvent<PubSubEvent<DocumentsCollectionUpdateEvent>>().Subscribe(this.UpdateCollection);
     this.service.GetAll().ForEach(x => this.Documents.Add(new DocumentViewModel(x, this.service)));
 }
コード例 #11
0
 public AutoDocumentService(
     IDocumentRegistry documentRegistry,
     IDocumentService documentService)
 {
     m_documentRegistry = documentRegistry;
     m_documentService = documentService;
 }
コード例 #12
0
ファイル: frmMain.cs プロジェクト: basmith/fakepad
        public frmMain(IDocumentService documentService, IConfigService configService)
        {
            this.documentService = documentService;
            this.configService = configService;

            InitializeComponent();
        }
コード例 #13
0
ファイル: SourceControlCommands.cs プロジェクト: Joxx0r/ATF
 public SourceControlCommands(
     ICommandService commandService,
     IDocumentRegistry documentRegistry,
     IDocumentService documentService)
     : base(commandService, documentRegistry, documentService)
 {
 }
コード例 #14
0
ファイル: GameEditor.cs プロジェクト: calciferol/LevelEditor
 public GameEditor(
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,            
     IControlHostService controlHostService,
     ICommandService commandService,
     IDocumentService documentService,
     IPaletteService paletteService,
     ISettingsService settingsService,            
     IResourceService resourceService,
     LevelEditorCore.ResourceLister resourceLister,            
     BookmarkLister bookmarkLister
     )
 {
     m_contextRegistry = contextRegistry;
     m_documentRegistry = documentRegistry;
     m_paletteService = paletteService;
     m_settingsService = settingsService;            
     m_documentService = documentService;            
     m_resourceService = resourceService;
     m_resourceLister = resourceLister;            
     m_bookmarkLister = bookmarkLister;
     
     //to-do wire it to to command service
     InputScheme.ActiveControlScheme = new MayaControlScheme();
     ResolveOnLoad = true;
 }
コード例 #15
0
ファイル: TimelineEditor.cs プロジェクト: GeertVL/ATF
        public TimelineEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            IPaletteService paletteService,
            ISettingsService settingsService)
        {
            s_schemaLoader = new SchemaLoader();
            s_repository.DocumentAdded += repository_DocumentAdded;
            s_repository.DocumentRemoved += repository_DocumentRemoved;

            paletteService.AddItem(Schema.markerType.Type, "Timelines", this);
            paletteService.AddItem(Schema.groupType.Type, "Timelines", this);
            paletteService.AddItem(Schema.trackType.Type, "Timelines", this);
            paletteService.AddItem(Schema.intervalType.Type, "Timelines", this);
            paletteService.AddItem(Schema.keyType.Type, "Timelines", this);
            paletteService.AddItem(Schema.timelineRefType.Type, "Timelines", this);

            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_controlHostService = controlHostService;
            m_documentService = documentService;
            m_settingsService = settingsService;
        }
コード例 #16
0
 public DocumentMappingController(IWorkflowService workflowService, IDocumentService documentService, IDocumentMappingService documentMappingService)
 {
     this.workflowService = workflowService;
     this.documentService = documentService;
     this.documentMappingService = documentMappingService;
     this.service = new Service(this.documentService, this.workflowService);
 }
コード例 #17
0
        /// <inheritdoc/>
        protected override void OnShutdown()
        {
            RemoveDocumentFactories();
            RemoveDataTemplates();

            _documentService = null;
        }
コード例 #18
0
ファイル: RemoveGoal.cs プロジェクト: liammclennan/TIS
 private void TheDayIs(CalendarDay day)
 {
     this.day = day;
     _documentService = Substitute.For<IDocumentService>();
     _documentService.Query(Arg.Any<AccountByNameSlug>()).Returns((new List<Account> { account }).AsQueryable());
     controller = new TodayController(_documentService);
 }
コード例 #19
0
ファイル: WebpageController.cs プロジェクト: neozhu/MrCMS
 public WebpageController(IWebpageBaseViewDataService webpageBaseViewDataService,
     IDocumentService documentService, IUrlValidationService urlValidationService)
 {
     _webpageBaseViewDataService = webpageBaseViewDataService;
     _documentService = documentService;
     _urlValidationService = urlValidationService;
 }
コード例 #20
0
ファイル: NewUser.cs プロジェクト: liammclennan/TIS
 protected void TheName(string fullName)
 {
     model = new NewAccountModel { FirstName = fullName.Split(' ')[0], LastName = fullName.Split(' ')[1] };
     session = Substitute.For<IDocumentService>();
     cookieGenerator = Substitute.For<IAuthCookieGenerator>();
     controller = new RegistrationController(session, cookieGenerator);
 }
コード例 #21
0
ファイル: Service.cs プロジェクト: jfvaleroso/WMS_Revised
 public Service(IDocumentService documentService, IProcessService processService, ISubProcessService subProcessService, IClassificationService classificationService)
 {
     this.documentService = documentService;
     this.processService = processService;
     this.subProcessService = subProcessService;
     this.classificationService = classificationService;
 }
コード例 #22
0
 public DocumentViewModel(Document document, IDocumentService documentService)
 {
     this.service = documentService;
     this.Model = document;
     this.mode = DocumentMode.Edit;
     this.IsBusy = false;
 }
コード例 #23
0
		public DisbursementHistoryServiceTest()
		{
			_nachaFileManager = Substitute.For<INachaFileGenerationManager>();
			_documentService = Substitute.For<IDocumentService>();
			_archiveService = Substitute.For<IArchiveService>();
			_target = new DisbursementHistoryService(_nachaFileManager, _documentService, _archiveService);
		}
コード例 #24
0
 public DocumentViewModel(IDocumentService documentService)
 {
     this.Model = new Document();
     this.service = documentService;
     this.mode = DocumentMode.Create;
     this.IsBusy = false;
 }
コード例 #25
0
ファイル: ProductService.cs プロジェクト: neozhu/Ecommerce
 public ProductService(ISession session, IDocumentService documentService, SiteSettings ecommerceSettings, IUniquePageService uniquePageService)
 {
     _session = session;
     _documentService = documentService;
     _ecommerceSettings = ecommerceSettings;
     _uniquePageService = uniquePageService;
 }
コード例 #26
0
ファイル: FeeDisbursementService.cs プロジェクト: evkap/DVS
		public FeeDisbursementService(IFeeDisbursementManager feeDisbursementManager, IDocumentService documentService, INachaFileGenerationService nachaFileGenerationService, IOrderService orderService)
		{
			_documentService = ValidationUtil.CheckOnNullAndThrowIfNull(documentService);
			_feeDisbursementManager = ValidationUtil.CheckOnNullAndThrowIfNull(feeDisbursementManager);
			_nachaFileGenerationService = ValidationUtil.CheckOnNullAndThrowIfNull(nachaFileGenerationService);
			_orderService = ValidationUtil.CheckOnNullAndThrowIfNull(orderService);
		}
コード例 #27
0
        public IncomesController(IDocumentService<IncomeEFModel> incomeService, 
			ICatalogService<ProductEFModel> productService, ICatalogService<SizeEFModel> sizeService)
        {
            this.incomeService = incomeService;
            this.productService = productService;
            this.sizeService = sizeService;
        }
コード例 #28
0
 public SetupEcommerceWidgets(IWidgetService widgetService, IDocumentService documentService, IFormAdminService formAdminService, IFileService fileService)
 {
     _widgetService = widgetService;
     _documentService = documentService;
     _formAdminService = formAdminService;
     _fileService = fileService;
 }
コード例 #29
0
ファイル: FormPostingHandler.cs プロジェクト: neozhu/MrCMS
 public FormPostingHandler(IDocumentService documentService, IFileService fileService, MailSettings mailSettings, ISession session)
 {
     _documentService = documentService;
     _session = session;
     _fileService = fileService;
     _mailSettings = mailSettings;
 }
コード例 #30
0
        protected override void OnStartup()
        {
            Editor.Extensions.OfType<GameExtension>().FirstOrDefault().ThrowIfMissing();
            _documentService = Editor.Services.GetInstance<IDocumentService>().ThrowIfMissing();

            AddDataTemplates();
            AddDocumentFactories();
        }
コード例 #31
0
 protected override void InternalDispose(bool disposing)
 {
     base.InternalDispose(disposing);
     if (!disposing)
     {
         return;
     }
     this.selectionManager.LateActiveSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.SelectionManager_LateActiveSceneUpdatePhase);
     this.documentService.ActiveDocumentChanged       -= new DocumentChangedEventHandler(this.DocumentService_ActiveDocumentChanged);
     this.selectionManager = (SelectionManager)null;
     this.documentService  = (IDocumentService)null;
     this.designerContext  = (DesignerContext)null;
 }
コード例 #32
0
        /// <summary>
        /// Creates a mocked implementation of <see cref="IAccountService"/>.
        /// </summary>
        /// <param name="users">The users to store in the mock implementation.</param>
        /// <returns>
        /// The created mocked instance of <see cref="IAccountService"/>.
        /// </returns>
        private static IAccountService CreateClient(IEnumerable <LondonTravelUser> users)
        {
            Mock <IDocumentService> mock = new Mock <IDocumentService>();

            mock.Setup((p) => p.GetAsync(It.IsAny <Expression <Func <LondonTravelUser, bool> > >(), It.IsAny <CancellationToken>()))
            .ReturnsAsync((Expression <Func <LondonTravelUser, bool> > a, CancellationToken b) => users.Where(a.Compile()));

            IDocumentService         client = mock.Object;
            IMemoryCache             cache  = Mock.Of <IMemoryCache>();
            ILogger <AccountService> logger = new LoggerFactory().CreateLogger <AccountService>();

            return(new AccountService(client, cache, logger));
        }
コード例 #33
0
 public DetailsController(
     ILogService logService,
     IFindACourseService findACourseService,
     IDocumentService <StaticContentItemModel> staticContentDocumentService,
     CmsApiClientOptions cmsApiClientOptions,
     IMapper mapper)
 {
     this.logService                   = logService;
     this.findACourseService           = findACourseService;
     this.staticContentDocumentService = staticContentDocumentService;
     this.cmsApiClientOptions          = cmsApiClientOptions;
     this.mapper = mapper;
 }
コード例 #34
0
        /// <summary>
        ///
        /// </summary>
        public DocumentViewModel(IEventAggregator aggregator)
        {
            if (aggregator == null)
            {
                throw new ArgumentNullException("aggregator");
            }

            _aggregator = aggregator;
            _docsrv     = ServiceLocator.Current.GetInstance <IDocumentService>();

            this.Documents = new ObservableCollection <Document>();
            _aggregator.GetEvent <LsSelectedEvent>().Subscribe(lsSelectedEventHandler);
        }
コード例 #35
0
ファイル: Editor.cs プロジェクト: zparr/ATF
 public Editor(
     IControlHostService controlHostService,
     IDocumentService documentService,
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,
     DomTypes domTypes)
 {
     m_controlHostService = controlHostService;
     m_documentService    = documentService;
     m_contextRegistry    = contextRegistry;
     m_documentRegistry   = documentRegistry;
     m_domTypes           = domTypes.GetDomTypes();
 }
コード例 #36
0
        public FinancialReportController(
            IFinancialReportService financialReportService,
            IDocumentService documentService,
            IMapper mapper)
        {
            Require.Objects.NotNull(financialReportService, nameof(financialReportService));
            Require.Objects.NotNull(documentService, nameof(documentService));
            Require.Objects.NotNull(mapper, nameof(mapper));

            _financialReportService = financialReportService;
            _documentService        = documentService;
            _mapper = mapper;
        }
コード例 #37
0
 public SearchController(ServiceQuery serviceQuery, SearchServiceHandler searchHandler, ProcessHandler processHandler,
                         IQueryFactory queryFactory, IGlobalStoreManager globalStore, ServiceManager serviceManager, IDocumentService documentService,
                         ClassifierServiceHandler classifierHandler)
 {
     GlobalStore            = globalStore;
     this.queryFactory      = queryFactory;
     this.processHandler    = processHandler;
     this.searchHandler     = searchHandler;
     this.serviceQuery      = serviceQuery;
     this.serviceManager    = serviceManager;
     this.documentService   = documentService;
     this.classifierHandler = classifierHandler;
 }
コード例 #38
0
ファイル: ModuleController.cs プロジェクト: jbe2277/waf
 public ModuleController(IShellService shellService, IDocumentService documentService, INavigationService navigationService, EmailAccountsController emailAccountsController,
                         ExportFactory <EmailFolderController> emailFolderControllerFactory, ExportFactory <NewEmailController> newEmailControllerFactory)
 {
     this.shellService                 = shellService;
     this.documentService              = documentService;
     this.navigationService            = navigationService;
     this.emailAccountsController      = emailAccountsController;
     this.emailFolderControllerFactory = emailFolderControllerFactory;
     this.newEmailControllerFactory    = newEmailControllerFactory;
     newEmailCommand        = new DelegateCommand(NewEmail);
     itemCountSynchronizers = new List <ItemCountSynchronizer>();
     serializer             = new Lazy <DataContractSerializer>(CreateDataContractSerializer);
 }
コード例 #39
0
 public BankAccountCommands(
     IPaymentRepository repository,
     IBrandRepository brandRepository,
     IActorInfoProvider actorInfoProvider,
     IDocumentService documentsService,
     IEventBus eventBus)
 {
     _repository        = repository;
     _brandRepository   = brandRepository;
     _actorInfoProvider = actorInfoProvider;
     _documentsService  = documentsService;
     _eventBus          = eventBus;
 }
コード例 #40
0
        public void Save(DependencyObject entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }
            IDocumentService service = OrmEntry.CreateDocumentService(entity.GetDataEntityType(), this.DBDriver) as IDocumentService;

            if (service != null)
            {
                service.Save(entity);
            }
        }
コード例 #41
0
 public HouseHoldingRunEngine(
     IHouseHoldingFileRepository houseHoldingFileRepository,
     IHouseHoldingRunRepository houseHoldingRunRepository,
     IHouseHoldRepository houseHoldRepository,
     IDocumentService documentService,
     IGridRunService gridRunService)
 {
     _houseHoldingFileRepository = houseHoldingFileRepository;
     _houseHoldingRunRepository  = houseHoldingRunRepository;
     _houseHoldRepository        = houseHoldRepository;
     _documentService            = documentService;
     _gridRunService             = gridRunService;
 }
コード例 #42
0
ファイル: Editor.cs プロジェクト: zparr/ATF
 public Editor(
     IControlHostService controlHostService,
     IDocumentService documentService,
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,
     SchemaLoader schemaLoader)
 {
     m_controlHostService = controlHostService;
     m_documentService    = documentService;
     m_contextRegistry    = contextRegistry;
     m_documentRegistry   = documentRegistry;
     m_schemaLoader       = schemaLoader;
 }
コード例 #43
0
 public void OpenFile(IDocumentService doc)
 {
     if (!_isEnable)
     {
         return;
     }
     //if (RecoveryInfo.DocsClosedUnGracefully.Count > 0 && NeedShowRecoveryWindow)
     //{
     //    var _ListEventAggregator = ServiceLocator.Current.GetInstance<IEventAggregator>();
     //    _ListEventAggregator.GetEvent<RecoveryDocumentOpenEvent>().Publish(null);
     //    RecoveryInfo.DocsClosedUnGracefully.Clear();
     //}
 }
コード例 #44
0
ファイル: NodeViewModel.cs プロジェクト: naver/protonow
        private void DeletePage(ITreeNode treeNodeObject, bool isRecursive = true)
        {
            IDocumentService doc = ServiceLocator.Current.GetInstance <IDocumentService>();

            if (doc.Document != null && treeNodeObject != null)
            {
                if (treeNodeObject.NodeType == TreeNodeType.MasterPage)
                {
                    IEnumerable <IWidget> extendPageWidget = null;
                    IPage page = null;
                    if (doc.Document.MasterPages.Contains(treeNodeObject.Guid) && doc.Document.MasterPages[treeNodeObject.Guid] != null)
                    {
                        page = doc.Document.MasterPages[treeNodeObject.Guid];
                        bool isOpened = page.IsOpened;
                        if (isOpened == false)
                        {
                            page.Open();
                        }
                        extendPageWidget = page.Widgets.OfType <IWidget>().Where(x => x is Naver.Compass.Service.Document.IDynamicPanel || x is Naver.Compass.Service.Document.IHamburgerMenu || x is Naver.Compass.Service.Document.IToast);

                        if (extendPageWidget != null)
                        {
                            foreach (var extendpage in extendPageWidget)
                            {
                                _ListEventAggregator.GetEvent <ClosePageEvent>().Publish(extendpage.Guid);
                            }
                        }

                        if (!isOpened)
                        {
                            page.Close();
                        }
                    }

                    doc.Document.DeleteMasterPage(treeNodeObject.Guid);
                    _ListEventAggregator.GetEvent <ClosePageEvent>().Publish(treeNodeObject.Guid);
                    _ListEventAggregator.GetEvent <FocusSitemapEvent>().Publish(null);


                    RefreshInfoCount(-1);
                }

                if (isRecursive)
                {
                    foreach (ITreeNode child in treeNodeObject.ChildNodes)
                    {
                        DeletePage(child, isRecursive);
                    }
                }
            }
        }
コード例 #45
0
        /// <summary>
        /// Test restoration of the document.
        /// </summary>
        /// <param name="service">The <see cref="IDocumentService"/>.</param>
        /// <param name="auditId">The id of the <see cref="DocumentAudit"/>.</param>
        /// <param name="uid">The unique identifier of the <see cref="Document"/>.</param>
        /// <returns>An asynchronous task.</returns>
        private static async Task TestRestoreDocumentAsync(
            IDocumentService service,
            Guid auditId,
            string uid)
        {
            var start = TestStart();
            var doc   = await service.LoadDocumentAsync(uid);

            Console.WriteLine($"Doc '{uid}' exists = {doc != null}");
            var restoredDoc = await service.RestoreDocumentAsync(auditId, uid);

            Console.WriteLine($"Doc '{uid}' restored = {restoredDoc != null}");
            TestEnd(start);
        }
コード例 #46
0
 public DocumentController(IDocumentViewModelService documentViewModelService,
                           IDocumentService documentService,
                           IDocumentTypeService documentTypeService,
                           ITranslationService translationService,
                           ICustomerService customerService,
                           ICustomerActivityService customerActivityService)
 {
     _documentViewModelService = documentViewModelService;
     _documentService          = documentService;
     _documentTypeService      = documentTypeService;
     _translationService       = translationService;
     _customerService          = customerService;
     _customerActivityService  = customerActivityService;
 }
コード例 #47
0
        public KeyValueEditor(ICommandService commandService,
                              IControlHostService controlHostService,
                              IContextRegistry contextRegistry,
                              IDocumentRegistry documentRegstiry,
                              IDocumentService documentService)
        {
            this.commandService     = commandService;
            this.contextRegistry    = contextRegistry;
            this.controlHostService = controlHostService;
            this.documentRegstiry   = documentRegstiry;
            this.documentService    = documentService;

            documentInfo = new DocumentClientInfo("KVDocument", (string)null, null, null, true);
        }
コード例 #48
0
        public void Init()
        {
            _documentService = Substitute.For <IDocumentService <CmsApiSharedContentModel> >();
            var inMemorySettings = new Dictionary <string, string> {
                { Constants.SharedContentGuidConfig, Guid.NewGuid().ToString() }
            };

            _config = new ConfigurationBuilder()
                      .AddInMemoryCollection(inMemorySettings)
                      .Build();

            _compositeSettings = Options.Create(new CompositeSettings());
            _authService       = Substitute.For <IAuthService>();
        }
コード例 #49
0
        public DocumentViewModel()
        {
            CleanUp();
            _documentService = new DocumentService();
            _clientService   = new ClientService();

            CheckRoles();
            LoadDocumentCategories();

            Messenger.Default.Register <ClientDTO>(this, (message) =>
            {
                SelectedClientParam = message;
            });
        }
コード例 #50
0
 public Editor(
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,
     IDocumentService documentService,
     TreeLister treeLister,
     SchemaLoader schemaLoader)
 {
     m_documentService  = documentService;
     m_contextRegistry  = contextRegistry;
     m_documentRegistry = documentRegistry;
     m_documentRegistry.ActiveDocumentChanged += documentRegistry_ActiveDocumentChanged;
     m_schemaLoader = schemaLoader;
     m_treeLister   = treeLister;
 }
コード例 #51
0
        public List <string> CreateDocumentDummyData(IDocumentService documentService, int count, string userId)
        {
            var docIdList = new List <string>();

            for (int index = 0; index < count; index++)
            {
                documentService.UploadDocument("DUMMY_DEMO_DOC" + index, "PATH" + index, userId);
            }

            var docs = documentService.GetAllDocuments(userId) as GetAllDocumentsResponseOk;

            docIdList.AddRange(docs?.Documents.Select(doc => doc.DocId));
            return(docIdList);
        }
コード例 #52
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenDocumentsSearchScope"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        /// <param name="documentService">The document service.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="editor"/> or <paramref name="documentService"/> is
        /// <see langword="null"/>.
        /// </exception>
        public OpenDocumentsSearchScope(IEditorService editor, IDocumentService documentService)
        {
            if (editor == null)
            {
                throw new ArgumentNullException(nameof(editor));
            }
            if (documentService == null)
            {
                throw new ArgumentNullException(nameof(documentService));
            }

            _editor          = editor;
            _documentService = documentService;
        }
コード例 #53
0
 public DocumentAppService(IDocumentService documentService,
                           IMapper mapper,
                           IPlotService plotService,
                           IOptions <AppSettings> options,
                           IHttpContextAccessor httpContextAccessor,
                           UserManager <AppUser> userManager)
 {
     _documentService     = documentService;
     _mapper              = mapper;
     _httpContextAccessor = httpContextAccessor;
     _userManager         = userManager;
     _settings            = options.Value;
     _plotService         = plotService;
 }
コード例 #54
0
        public void FirstSetup()
        {
            _configuration = new ConfigurationBuilder()
                             .AddJsonFile("test.appsettings.json")
                             .Build();

            var strConn = _configuration.GetConnectionString("mainDb");

            _testUtilitiesImpl = new TestUtilitiesImpl(strConn);
            _drawingDal        = new DrawingDalImpl(_configuration);
            _documentService   = new DocumentServiceImpl(_drawingDal);
            _signUpService     = new SignUpServiceImpl(_drawingDal);
            _createdUsers      = _testUtilitiesImpl.CreateUserDummyData(_signUpService, CreatedPlayersAmount);
        }
コード例 #55
0
 public CheckYourAnswersController(ILogger <CheckYourAnswersController> logger, ISubmissionService submissionService,
                                   ICosmosService cosmosService, INotificationService notificationService,
                                   IDocumentService documentService, ISessionService sessionService,
                                   IPageHelper pageHelper, IConfiguration configuration)
 {
     _logger              = logger;
     _submissionService   = submissionService;
     _cosmosService       = cosmosService;
     _notificationService = notificationService;
     _documentService     = documentService;
     _sessionService      = sessionService;
     _pageHelper          = pageHelper;
     _configuration       = configuration;
 }
コード例 #56
0
ファイル: Process.cs プロジェクト: syedshah/Repository
        private void PerformIOC()
        {
            string test = ConfigurationManager.AppSettings["companyCode"];

            IoCContainer.ResoloveDependencies();

            _documentService         = IoCContainer.Resolve <IDocumentService>();
            _documentApprovalService = IoCContainer.Resolve <IAutoApprovalService>();
            _subDocTypeService       = IoCContainer.Resolve <ISubDocTypeService>();
            _gridRunEngine           = IoCContainer.Resolve <IGridRunEngine>();
            _manCoService            = IoCContainer.Resolve <IManCoService>();
            _approvalEngine          = IoCContainer.Resolve <IApprovalEngine>();
            _gridRunService          = IoCContainer.Resolve <IGridRunService>();
        }
コード例 #57
0
        public override object TearDown(IBuilderContext context, object item)
        {
            WorkItem workItem = StrategyUtility.GetWorkItem(context, item);

            if (workItem != null)
            {
                IDocumentService documentService = workItem.Services.Get <IDocumentService>();
                if (documentService != null && item is Control)
                {
                    RegisterDocumentAdapter(documentService, (Control)item, false);
                }
            }
            return(base.TearDown(context, item));
        }
コード例 #58
0
 public StockService(IManufacturerRepository manufacturerRepository
                     , IModelRepository modelRepository
                     , IStockRepository stockRepository
                     , IDocumentService imageService
                     , ICategoryRepository categoryRepository
                     , IModelSpecificContractRepository modelSpecificContractRepository
                     , IUnitOfWork unitOfWork) : base(unitOfWork)
 {
     _manufacturerRepository          = manufacturerRepository;
     _modelRepository                 = modelRepository;
     _stockRepository                 = stockRepository;
     _imageService                    = imageService;
     _categoryRepository              = categoryRepository;
     _modelSpecificContractRepository = modelSpecificContractRepository;
 }
 public SharedContentCacheReloadService(
     ILogger <SharedContentCacheReloadService> logger,
     IMapper mapper,
     IDocumentService <ContentItemModel> contentItemDocumentService,
     ICmsApiService cmsApiService,
     CmsApiClientOptions cmsApiClientOptions,
     IContentTypeMappingService contentTypeMappingService)
 {
     this.logger = logger;
     this.mapper = mapper;
     this.contentItemDocumentService = contentItemDocumentService;
     this.cmsApiService             = cmsApiService;
     this.cmsApiClientOptions       = cmsApiClientOptions;
     this.contentTypeMappingService = contentTypeMappingService;
 }
コード例 #60
0
        public void Init()
        {
            var inMemorySettings = new Dictionary <string, string> {
                { DFC.APP.ActionPlans.Data.Common.Constants.SharedContentGuidConfig, Guid.NewGuid().ToString() }
            };

            _config = new ConfigurationBuilder()
                      .AddInMemoryCollection(inMemorySettings)
                      .Build();
            _documentService   = Substitute.For <IDocumentService <CmsApiSharedContentModel> >();
            _logger            = Substitute.For <ILogger <ErrorController> >();
            _compositeSettings = Options.Create(new CompositeSettings());
            _logger            = new Logger <ErrorController>(new LoggerFactory());
            _options           = Options.Create(new CompositeSettings());
        }