public SponsorAccessManagementController(ISponsorManager _sponsorManager,
                                          IStudyManager _studyManager, IPageManager _pagemanager)
 {
     this.sponsorManager = _sponsorManager;
     this.studyManager   = _studyManager;
     this.pagemanager    = _pagemanager;
 }
 public EditProfileController(IUserManager _usermanager, IPageManager _pagemanager,
                              INavigationLog _NavManager)
 {
     this.usermanager = _usermanager;
     this.NavManager  = _NavManager;
     this.pagemanager = _pagemanager;
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of page.
        /// </summary>
        /// <param name="manager"></param>
        /// <param name="index"></param>
        /// <param name="content"></param>
        internal Page(IPageManager manager, long index, byte[] content)
        {
            if (content == null)
            {
                throw new ArgumentNullException(nameof(content));
            }

            if (manager == null)
            {
                throw new ArgumentNullException(nameof(manager));
            }

            if (index < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(index), "Page index should not be negative");
            }

            _index   = index;
            _content = content;
            _manager = manager;

            if (!manager.CheckPage(this))
            {
                throw new InvalidOperationException("Page manager does not accept page");
            }
        }
Пример #4
0
        public async Task Undo(IPageManager pageManager, ITransaction tran)
        {
            tran.VerifyLock(this.PageId, LockManager.LockTypeEnum.Exclusive);
            IPage page = await pageManager.GetPage(this.PageId, tran, this.pageType, this.columnInfos).ConfigureAwait(false);

            page.UndoLog(this, tran);
        }
Пример #5
0
        public PageController(ILogger <PageController> logger,
                              IPageRepository pageRepository,
                              IPageManager pageManager,
                              IDeviserControllerFactory deviserControllerFactory,
                              IScopeService scopeService,
                              IContentManager contentManager,
                              IModuleManager moduleManager,
                              IInstallationProvider installationManager)
        {
            _logger = logger;
            _installationManager = installationManager;
            _scopeService        = scopeService;

            if (!_isInstalled)
            {
                _isInstalled = _installationManager.IsPlatformInstalled;
            }

            if (!_isDbExist)
            {
                _isDbExist = _installationManager.IsDatabaseExist;
            }

            if (_isInstalled)
            {
                _pageRepository           = pageRepository;
                _pageManager              = pageManager;
                _deviserControllerFactory = deviserControllerFactory;
                _contentManager           = contentManager;
                _moduleManager            = moduleManager;
            }
        }
Пример #6
0
        public MetadataManager(IPageManager pageAllocator, HeapWithOffsets <char[]> stringHeap, IBootPageAllocator bootPageAllocator, ILogManager logManager)
        {
            this.pageAllocator = pageAllocator;
            this.stringHeap    = stringHeap;
            this.logManager    = logManager;

            if (!bootPageAllocator.BootPageInitialized())
            {
                using (ITransaction tran = this.logManager.CreateTransaction(this.pageAllocator, false, "GET_BOOT_PAGE"))
                    using (Releaser releaser = tran.AcquireLock(IBootPageAllocator.BootPageId, LockManager.LockTypeEnum.Exclusive).Result)
                    {
                        bootPageAllocator.AllocatePageBootPage(PageType.MixedPage, this.masterPageColumnDefinition, tran);
                        this.masterMetadataCollection = new PageListCollection(this.pageAllocator, this.masterPageColumnDefinition, IBootPageAllocator.BootPageId);
                        tran.Commit();
                    }

                MetadataInitialSetup();
            }
            else
            {
                using (ITransaction tran = this.logManager.CreateTransaction(this.pageAllocator, false, "GET_BOOT_PAGE"))
                {
                    using Releaser releaser       = tran.AcquireLock(IBootPageAllocator.BootPageId, LockManager.LockTypeEnum.Exclusive).Result;
                    this.masterMetadataCollection = new PageListCollection(this.pageAllocator, this.masterPageColumnDefinition, IBootPageAllocator.BootPageId);
                    tran.Commit();
                }
            }
        }
Пример #7
0
        public BPlusTreeNodeStorage(IPageManager pageManager, ISerializer <TKey> keySerializer, int maxKeySize)
        {
            if (maxKeySize <= 0)
            {
                throw new ArgumentException("ComparableComparableKeyOf size should be positive", nameof(maxKeySize));
            }

            _pageManager        = pageManager ?? throw new ArgumentNullException(nameof(pageManager));
            _keySerializer      = keySerializer ?? throw new ArgumentNullException(nameof(keySerializer));
            _maxKeySize         = maxKeySize;
            _nodeEntrySizeRange = DbItem.GetSizeRange(_maxKeySize + DbItemReference.BytesLength);

            if (NodeCapacity <= 2)
            {
                throw new ArgumentException("Too large key size", nameof(maxKeySize));
            }

            _dbItems = new DbItem[NodeCapacity];
            var bytes = new byte[_maxKeySize + DbItemReference.BytesLength];

            for (int i = 0; i < NodeCapacity; i++)
            {
                _dbItems[i] = new DbItem(bytes);
            }

            _pageCacheEnabled = _pageManager is ICachingPageManager;
        }
Пример #8
0
 public Page(Uri _Uri, IPageAction <Z> _pageAction, IPageManager <Z> _pageManager)
 {
     pageAction   = _pageAction;
     pageManager  = _pageManager;
     CurrentUri   = _Uri;
     Block        = new List <Z>();
     ChildrenPage = new List <Page <Z> >();
 }
 private void CheckStoragePages(IEnumerable <IPage> pages, IPageManager manager)
 {
     foreach (IPage p in pages)
     {
         IPage page = manager.FetchPage(p.Index);
         ArePagesEqual(page, p);
     }
 }
Пример #10
0
 public ExistingUserController(IUserManager _usermanager, ISponsorManager _sponsormanager,
                               IStudyManager _studymanager, IPageManager _pagemanager)
 {
     this.usermanager    = _usermanager;
     this.studymanager   = _studymanager;
     this.sponsormanager = _sponsormanager;
     this.pagemanager    = _pagemanager;
 }
        public ShellViewModel(IPageManager pageManager)
        {
            this.ViewAware = pageManager as PageManagerViewModel;

            TreeItems.AddRange(MainMenuTreeItemsProvider.GetDatas());
            TreeItems.FirstOrDefault().IsSelected = true;
            TreeViewSelectedChanged(TreeItems.FirstOrDefault());
        }
 public PageModuleController(ILifetimeScope container)
 {
     _logger         = container.Resolve <ILogger <PageModuleController> >();
     _pageRepository = container.Resolve <IPageRepository>();
     _moduleManager  = container.Resolve <IModuleManager>();
     _pageManager    = container.Resolve <IPageManager>();
     _scopeService   = container.Resolve <IScopeService>();
 }
Пример #13
0
 public StudyAccessManagementController(ISponsorManager _sponsormanager, IStudyManager _studymanager,
                                        IUserManager _usermanager, IPageManager _pagemanager)
 {
     this.sponsormanager = _sponsormanager;
     this.studymanager   = _studymanager;
     this.usermanager    = _usermanager;
     this.pagemanager    = _pagemanager;
 }
        internal RadixTreeKeyValueStorage(IPageManager pageManager, IRadixTree <TKey, TValue> tree, int autoFlushInterval, TimeSpan autoFlishInterval)
            : base(pageManager, autoFlushInterval, autoFlishInterval)
        {
            _tree = tree ?? throw new ArgumentNullException(nameof(tree));

            ValueType = typeof(TKey);
            KeyType   = typeof(TValue);
        }
Пример #15
0
        public MainForm()
        {
            InitializeComponent();

            _pageManager = new PageManagerFactory().CreateInstance(xtraTabControl1);

            RegisterEventHandlers();
            SetCaption();
        }
 internal ResourceEnumerator(
     IAsyncEnumerator <TResponse> responseEnumerator,
     IPageManager <TRequest, TResponse, TResource> pageManager,
     CancellationToken cancellationToken)
 {
     _responseEnumerator = responseEnumerator;
     _pageManager        = pageManager;
     _cancellationToken  = cancellationToken;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleAPresenterModel"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="pageManager">The page manager.</param>
        public ModuleAPresenterModel(
            IModuleAView view, 
            IPageManager pageManager)
        {
            _view = view;
            _view.Model = this;

            pageManager.Pages.Add(this);
        }
        internal BPlusTreeKeyValueStorage(IPageManager pageManager, IBPlusTree <TKey, TValue> tree, int maxKeySize, int autoFlushInterval, TimeSpan autoFlushTimeout)
            : base(pageManager, autoFlushInterval, autoFlushTimeout)
        {
            _maxKeySize = maxKeySize;
            _tree       = tree ?? throw new ArgumentNullException(nameof(tree));

            ValueType = typeof(TKey);
            KeyType   = typeof(TValue);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleAPresenterModel"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="pageManager">The page manager.</param>
        public ModuleAPresenterModel(
            IModuleAView view,
            IPageManager pageManager)
        {
            _view       = view;
            _view.Model = this;

            pageManager.Pages.Add(this);
        }
Пример #20
0
        public FreeSpaceMap(IPageManager pageManager)
        {
            if (pageManager == null)
            {
                throw new ArgumentNullException(nameof(pageManager));
            }

            _pageManager = pageManager;
        }
Пример #21
0
 public Parser(IGetHtmlContent _htmlSubject, AbstractPageFactory <T> _factory)
 {
     collectionConcurrent = new ConcurrentQueue <string>();
     _simpleFactory       = _factory;
     _Kernal = new StandardKernel();
     _Kernal.Load(Assembly.GetExecutingAssembly());
     _ipageManger = (_Kernal.Get <PageManager>() as IPageManager <T>);
     _ipageAction = (_Kernal.Get <PageIterableAction>() as IPageAction <T>);
     htmlSubject  = _htmlSubject;
 }
Пример #22
0
 public Transaction(ILogManager logManager, IPageManager pageManager, ulong transactionId, string name, IsolationLevelEnum isolationLevel)
 {
     this.transactionId  = transactionId;
     this.logRecords     = new List <ILogRecord>();
     this.logManager     = logManager;
     this.name           = name;
     this.state          = TransactionState.Open;
     this.pageManager    = pageManager;
     this.isolationLevel = isolationLevel;
 }
 /// <summary>
 /// This constructor is used for Mock Unit Testing purposes
 /// </summary>
 public VirtualList(IStateManager stateManager, IPageManager pageManager, IReferenceManager refManager, ISurrogateManager surManager = null, List <string> idxs = null, Dictionary <string, int> dict = null)
 {
     _stateManager             = stateManager;
     _pageManager              = pageManager;
     _referenceManager         = refManager;
     _surrogateManager         = surManager;
     PageUniqueIdOfTheIndexes  = idxs ?? new List <string>();
     InitialPositionOfEachPage = dict ?? new Dictionary <string, int>();
     InitializeOperationHelper();
 }
 public void InitializeTheList(IStateManager stateManager, IPageManager pageManager, IReferenceManager refManager, ISurrogateManager surManager, IUniqueIDGenerator uniqueIdGenerator, IServerEventAggregator serverEventAggregator)
 {
     _stateManager          = stateManager;
     _pageManager           = pageManager;
     _referenceManager      = refManager;
     _surrogateManager      = surManager;
     _uniqueIdGenerator     = uniqueIdGenerator;
     _serverEventAggregator = serverEventAggregator;
     InitializeOperationHelper();
 }
Пример #25
0
        /// <summary>
        /// Initializes a new instance of the Storage.
        /// </summary>
        /// <param name="pageManager">The FileSystemPageManager instance</param>
        /// <param name="autoFlushTimeout"></param>
        /// <param name="autoFlushInterval"></param>
        internal Storage(IPageManager pageManager, TimeSpan autoFlushTimeout, long autoFlushInterval = 10000)
        {
            _autoFlushTimeout    = autoFlushTimeout;
            _autoFlushInterval   = autoFlushInterval;
            _flushTimer          = new TimerHelper();
            _flushTimer.Elapsed += (timer, o) => Flush();

            PageManager         = pageManager;
            pageManager.Storage = this;
        }
Пример #26
0
 private void CheckStoragePages(IEnumerable <IPage> pages, IPageManager manager, long[] deletedPagesIndexes)
 {
     foreach (IPage p in pages)
     {
         if (!deletedPagesIndexes.Contains(p.Index))
         {
             IPage page = manager.FetchPage(p.Index);
             IsEqualPages(page, p);
         }
     }
 }
        public void Enable()
        {
            pageManager = PageManager.GetInstance();

            // Unsubscribe first in case we have a lingering subscription
            Unsubscribe();
            Subscribe();
            UpdatePackage(pageManager.GetSelectedVersion());

            IsEnabled = true;
        }
 public StudyController(IUserManager _usermanager, IStudyManager _studymanager,
                        IPageManager _pagemanager, INavigationLog _NavManager, IGenericGetter <User> _usergetter,
                        IGenericGetter <StudyStatusMapping> _mapGetter)
 {
     this.usermanager  = _usermanager;
     this.studymanager = _studymanager;
     this.pagemanager  = _pagemanager;
     this.NavManager   = _NavManager;
     this.usergetter   = _usergetter;
     this.mapGetter    = _mapGetter;
 }
Пример #29
0
        public VideosPageViewModel(IPathManager pathManager, IPageManager pageManager,
                                   IThumbnailGenerator thumbnailGenerator, IMediaManager mediaManager, IMessenger message)
        {
            BackgroundColor = Color.White;
            SelectionMode   = SelectionMode.None;
            SingleTap       = new Command(OnSingleTap);
            LongPressed     = new Command(OnLongPressed);
            Save            = new Command(OnSave);
            SaveAs          = new Command(OnSaveAs);
            Cancel          = new Command(OnCancel);
            JoinAndSave     = new Command(OnJoinAndSave);
            RefreshList     = new Command(OnRefresh);

            Videos        = new ObservableCollection <Video>();
            SelectedItems = new ObservableCollection <object>();

            _toolbarItems = new List <ToolbarItem>()
            {
                new ToolbarItem()
                {
                    Text    = "Save",
                    Command = Save
                },
                new ToolbarItem()
                {
                    Text    = "Save As",
                    Command = SaveAs
                },
                new ToolbarItem()
                {
                    Text    = "Join and Save",
                    Command = JoinAndSave
                },
                new ToolbarItem()
                {
                    Text    = "Cancel",
                    Command = Cancel
                }
            };

            _statusResourcesPaths = pathManager.GetStatusResourcesPaths();
            _appCachePath         = pathManager.GetAppCachePath();

            Task.Run(() =>
            {
                LoadData(thumbnailGenerator);
            });

            _pageManager        = pageManager;
            _thumbnailGenerator = thumbnailGenerator;
            _mediaManager       = mediaManager;
            _messenger          = message;
        }
 public DataMappingController(IPageManager _pagemanager, IGenericGetter <UserGroup> _groupsGetter,
                              IPrimaryDBGetters _dsStatusGetter, IGenericGetter <DataSource> _dataSourceGetter,
                              IContentMapper <DataSourceStudyStatus, LocalStudyStatus> _mapManager,
                              IGenericGetter <StudyStatusMapping> _statusMap)
 {
     this.pagemanager      = _pagemanager;
     this.groupsGetter     = _groupsGetter;
     this.dsStatusGetter   = _dsStatusGetter;
     this.dataSourceGetter = _dataSourceGetter;
     this.mapManager       = _mapManager;
     this.statusMap        = _statusMap;
 }
Пример #31
0
        public ITransaction CreateTransaction(IPageManager manager, bool isReadOnly, string name)
        {
            long tranId = Interlocked.Increment(ref lastTransactionId);

            ITransaction tran = isReadOnly switch
            {
                true => new ReadonlyTransaction(manager.GetLockManager(), (ulong)tranId),
                false => new Transaction(this, manager, (ulong)tranId, name)
            };

            return(tran);
        }
Пример #32
0
        /// <summary>
        /// Initializes a new instance of page.
        /// </summary>
        /// <param name="manager"></param>
        /// <param name="index"></param>
        /// <param name="getContent">Method that should perform lazy serialization</param>
        /// <param name="backingObject"></param>
        internal Page(IPageManager manager, long index, Func <byte[]> getContent, object backingObject)
        {
            if (index < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(index), "Page index should not be negative");
            }

            _index         = index;
            _getContent    = getContent ?? throw new ArgumentNullException(nameof(getContent));
            _backingObject = backingObject;
            _manager       = manager ?? throw new ArgumentNullException(nameof(manager));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NavigatorPresentationModel"/> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="pageManger">The page manger.</param>
        /// <param name="view">The view.</param>
        public NavigatorPresentationModel(
            IEventAggregator eventAggregator, 
            IPageManager pageManger, 
            INavigatorView view)
        {
            _eventAggregator = eventAggregator;
            _pageManger = pageManger;

            _view = view;
            _view.ItemChangeRequest += ViewItemChangeRequest;
            _view.Model = this;

            _eventAggregator.GetEvent<PageSelectedEvent>().Subscribe(OnPageSelected, ThreadOption.UIThread);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleBPresenterModel" /> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="view">The view.</param>
        /// <param name="pageManger">The page manger.</param>
        public ModuleBPresenterModel(
            IEventAggregator eventAggregator, 
            IModuleBView view, 
            IPageManager pageManger)
        {
            _eventAggregator = eventAggregator;

            _view = view;
            _view.Model = this;

            pageManger.Pages.Add(this);

            _sendMessageCommand = new DelegateCommand<object>(OnSendMessageCommandExecuted);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MusicSearchPresenter"/> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="model">The model.</param>
        /// <param name="view">The view.</param>
        /// <param name="pageManager">The page manager.</param>
        public MusicSearchPresenter(
            IEventAggregator eventAggregator, 
            IMusicSearchPresenterModel model, 
            IMusicSearchView view, 
            IPageManager pageManager)
        {
            _model = model;

            pageManager.Pages.Add(this);

            _view = view;
            _view.Model = _model;

            eventAggregator.GetEvent<PageSelectedEvent>().Subscribe(OnPageSelected, ThreadOption.UIThread);
        }
Пример #36
0
 public PageService(IPageManager pageManager, IMessageBusService messageBusService, IAuditService auditService)
 {
     _pageManager = pageManager;
     _messageBusService = messageBusService;
     _auditService = auditService;
 }