コード例 #1
0
ファイル: RealDataServerProcess.cs プロジェクト: cdy816/mars
        public RealDataServerProcess()
        {
            mTagManager  = ServiceLocator.Locator.Resolve <ITagManager>();
            mTagConsumer = ServiceLocator.Locator.Resolve <IRealTagConsumer>();

            ServiceLocator.Locator.Resolve <IRealDataNotify>().SubscribeValueChangedForConsumer("RealDataServerProcess", new ValueChangedNotifyProcesser.ValueChangedDelegate((ids, len) => {
                lock (mChangedTags)
                {
                    int[] vtmp = ArrayPool <int> .Shared.Rent(len);
                    Array.Copy(ids, 0, vtmp, 0, len);
                    mChangedTags.Enqueue(new Tuple <int[], int>(vtmp, len));
                }
                if (!mIsClosed)
                {
                    resetEvent.Set();
                }
            }), new ValueChangedNotifyProcesser.BlockChangedDelegate((bids) => {
                if (mBlockCallBackRegistorIds.Count > 0)
                {
                    lock (mChangedBlocks)
                        mChangedBlocks.Enqueue(bids);
                }
                if (!mIsClosed)
                {
                    resetEvent.Set();
                }
            }), null, RealDataNotifyType.Block);
        }
コード例 #2
0
ファイル: ImportBook.cs プロジェクト: dhq-boiler/Sunctum
        private void TagImage(ITagManager tagManager)
        {
            foreach (var tagName in TagNames)
            {
                var tag = TagFacade.FindByTagName(tagName);

                if (tag == null)
                {
                    tag = new TagViewModel(Guid.NewGuid(), tagName);
                    TagFacade.Insert(tag);
                    tagManager.Tags.Add(tag);
                }

                _images = new List <ImageViewModel>();

                var pages = PageFacade.FindByBookId(_BookID);
                for (int i = 0; i < pages.Count(); ++i)
                {
                    var page = pages.ElementAt(i);
                    PageFacade.GetProperty(ref page);
                    _images.Add(page.Image);
                }

                ImageTagFacade.BatchInsert(tag, _images);

                foreach (var imageTag in _images.Select(i => new ImageTagViewModel(i.ID, tag)))
                {
                    tagManager.Chains.Add(imageTag);
                }
            }
        }
コード例 #3
0
 public GalleryController(IPhotoManager photoManager, ITagManager tagManager, IConfig config, IRatingManager ratingManager)
 {
     _config        = config;
     _tagManager    = tagManager;
     _photoManager  = photoManager;
     _ratingManager = ratingManager;
 }
コード例 #4
0
ファイル: BlogStoryController.cs プロジェクト: BionStt/blog
 public BlogStoryController(IBlogStoryManager blogStoryManager,
                            ITagManager tagManager,
                            IOptions <DefaultPageInfoOptions> pageInfo) : base(pageInfo)
 {
     _blogStoryManager = blogStoryManager;
     _tagManager       = tagManager;
 }
コード例 #5
0
ファイル: TagAppService.cs プロジェクト: ut-hk/ut-api-legacy
 public TagAppService(
     ITagManager tagManager,
     IRepository <Tag, long> tagRepository)
 {
     _tagManager    = tagManager;
     _tagRepository = tagRepository;
 }
コード例 #6
0
 public CmsKitDataSeedContributor(
     IGuidGenerator guidGenerator,
     ICmsUserRepository cmsUserRepository,
     CmsKitTestData cmsKitTestData,
     ICommentRepository commentRepository,
     ReactionManager reactionManager,
     IRatingRepository ratingRepository,
     ICurrentTenant currentTenant,
     IContentRepository contentRepository,
     ITagManager tagManager,
     IEntityTagManager entityTagManager,
     IPageRepository pageRepository,
     IOptions <CmsKitOptions> options,
     IOptions <CmsKitTagOptions> tagOptions)
 {
     _guidGenerator     = guidGenerator;
     _cmsUserRepository = cmsUserRepository;
     _cmsKitTestData    = cmsKitTestData;
     _commentRepository = commentRepository;
     _reactionManager   = reactionManager;
     _ratingRepository  = ratingRepository;
     _currentTenant     = currentTenant;
     _contentRepository = contentRepository;
     _tagManager        = tagManager;
     _entityTagManager  = entityTagManager;
     _pageRepository    = pageRepository;
     _options           = options;
     _tagOptions        = tagOptions;
 }
コード例 #7
0
ファイル: TagController.cs プロジェクト: isiah18/CMS-Project
        public TagController()
        {
            var kernel = new StandardKernel(new BllBindings());

            kernel.Load(Assembly.GetExecutingAssembly());
            _tagManager = kernel.Get <ITagManager>();
        }
コード例 #8
0
 public TagOccurrencesUpdater(
     IEntityTagStore <EntityTag> entityTagStore,
     ITagManager <TModel> tagManager)
 {
     _entityTagStore = entityTagStore;
     _tagManager     = tagManager;
 }
コード例 #9
0
 public AdminViewProvider(
     ITagManager <Tag> tagManager,
     IContextFacade contextFacade)
 {
     _tagManager    = tagManager;
     _contextFacade = contextFacade;
 }
コード例 #10
0
 public CustomersController(ICustomerManager customerManager, IContactManager contactManager, IBuildingManager buildingManager,
                            IRequestManager requestManager,
                            IInterventionManager interventionManager, IOfferManager offerManager,
                            IOrderManager orderManager, IDepositInvoiceManager depositInvoiceManager, IInvoiceManager invoiceManager,
                            ITagManager tagManager, ICountryManager countryManager, ILanguageManager languageManager,
                            IHonorificPrefixManager honorificPrefixManager, IIncludedCollector includedCollector,
                            IMapper mapper, IJsonApiBuilder jsonApiBuilder)
 {
     _customerManager        = customerManager;
     _contactManager         = contactManager;
     _buildingManager        = buildingManager;
     _requestManager         = requestManager;
     _interventionManager    = interventionManager;
     _offerManager           = offerManager;
     _orderManager           = orderManager;
     _depositInvoiceManager  = depositInvoiceManager;
     _invoiceManager         = invoiceManager;
     _tagManager             = tagManager;
     _countryManager         = countryManager;
     _languageManager        = languageManager;
     _honorificPrefixManager = honorificPrefixManager;
     _includedCollector      = includedCollector;
     _mapper         = mapper;
     _jsonApiBuilder = jsonApiBuilder;
 }
コード例 #11
0
 public PiggyBankRepository(IPiggyBankDbContext dbContext)
 {
     BookManager = new BookManager(dbContext);
     AccountManager = new AccountManager(dbContext);
     TransactionManager = new TransactionManager(dbContext);
     TagManager = new TagManager(dbContext);
 }
コード例 #12
0
        /// <summary>
        /// Creates <see cref="NumTags"/> tags on the server of various types.
        /// Each tag will have an example keyword and property.
        /// </summary>
        /// <param name="manager">The tag manager for creating the tags.</param>
        /// <returns>The <see cref="TagData"/> used to create the tags.</returns>
        static TagData[] CreateTags(ITagManager manager)
        {
            var tags       = new TagData[NumTags];
            var keywords   = new[] { "example" };
            var properties = new Dictionary <string, string>
            {
                ["example"] = "query"
            };
            var dataTypes = new[]
            {
                DataType.Bool, DataType.DateTime, DataType.Double,
                DataType.Int32, DataType.String, DataType.UInt64
            };

            for (int x = 1; x <= NumTags; x++)
            {
                properties["number"] = x.ToString(CultureInfo.InvariantCulture);
                tags[x - 1]          = new TagData($"example.query.{x:D3}",
                                                   dataTypes[x % dataTypes.Length], keywords, properties);
            }

            /*
             * Create all of the tags in one request to the server. Fails if any
             * of the tags already exist with a different data type.
             */
            manager.Update(tags);
            return(tags);
        }
コード例 #13
0
        public static List <Task> GenerateRemoveImageTagTasks(ITagManager tagManager, IEnumerable <EntryViewModel> entries, params string[] tagNames)
        {
            List <Task> tasks = new List <Task>();

            foreach (var tagName in tagNames)
            {
                foreach (var entry in entries)
                {
                    var book = entry as BookViewModel;
                    if (book != null)
                    {
                        var pages = PageFacade.FindByBookId(book.ID);
                        for (int i = 0; i < pages.Count(); ++i)
                        {
                            var p = pages.ElementAt(i);
                            tasks.Add(new Task(() =>
                            {
                                GetPropertyIfImageIsNull(ref p);
                            }));
                            tasks.Add(new Task(() =>
                            {
                                Remove.ImageTagRemoving.Remove(tagManager, p.Image, tagName);
                            }));
                        }
                        continue;
                    }

                    var page = entry as PageViewModel;
                    if (page != null)
                    {
                        tasks.Add(new Task(() =>
                        {
                            GetPropertyIfImageIsNull(ref page);
                        }));
                        tasks.Add(new Task(() =>
                        {
                            Remove.ImageTagRemoving.Remove(tagManager, page.Image, tagName);
                        }));
                        continue;
                    }

                    var image = entry as ImageViewModel;
                    if (image != null)
                    {
                        tasks.Add(new Task(() =>
                        {
                            Remove.ImageTagRemoving.Remove(tagManager, page.Image, tagName);
                        }));
                        continue;
                    }
                }

                tasks.Add(new Task(() => tagManager.SelectedEntityTags = tagManager.GetCommonTags()));
                tasks.Add(new Task(() => tagManager.ObserveSelectedEntityTags()));
                tasks.Add(new Task(() => tagManager.ObserveTagCount()));
            }

            return(tasks);
        }
コード例 #14
0
 public SubmissionController(IPhotoManager photoManager, ILogger logger, ITagManager tagManager, IConfig config, IRatingManager ratingManager)
 {
     _logger        = logger;
     _config        = config;
     _tagManager    = tagManager;
     _photoManager  = photoManager;
     _ratingManager = ratingManager;
 }
コード例 #15
0
 public TagsController(ILogger <TagsController> logger, ITagBL tagBL, ITagManager tagManager,
                       IManagedTracer managedTracer)
 {
     _logger        = logger;
     _tagBL         = tagBL;
     _tagManager    = tagManager;
     _managedTracer = managedTracer;
 }
コード例 #16
0
 /// <summary>
 /// 构造函数
 ///</summary>
 public TagAppService(IRepository <Tag, Guid> tagRepository, ITagManager tagManager, TagListExcelExporter tagListExcelExporter, IRepository <PostTag, int> postTagRepository, IRepository <BlogTag, int> blogTagRepository)
 {
     _tagRepository        = tagRepository;
     _tagManager           = tagManager;
     _tagListExcelExporter = tagListExcelExporter;
     _postTagRepository    = postTagRepository;
     _blogTagRepository    = blogTagRepository;
 }
コード例 #17
0
        private static TagViewModel CreateTag(ITagManager tagMng, string tagName)
        {
            var newTag = new TagViewModel(Guid.NewGuid(), tagName);

            TagFacade.Insert(newTag);
            tagMng.Tags.Add(newTag);
            return(newTag);
        }
コード例 #18
0
 public DemoAppService(
     IIowManager iowManager,
     ITagManager tagManager
     )
 {
     _iowManager = iowManager;
     _tagManager = tagManager;
 }
コード例 #19
0
 public SelectTagsViewModel(ITagManager tagManager, IRecordingManager recordingManager)
 {
     _recordingManager = recordingManager;
     _tagManager = tagManager;
     Tags = new BindableCollection<Tag>();
     SelectedTags = new BindableCollection<Tag>();
     Tags.CollectionChanged += (sender, args) => HasTags = Tags.Any();
 }
コード例 #20
0
 public ProductController(IProductManager productManager, ITagManager tagManager, IBrandManager brandManager, ISpecificationManager specificationManager, IFileManager fileManager)
 {
     this.productManager       = productManager;
     this.tagManager           = tagManager;
     this.brandManager         = brandManager;
     this.specificationManager = specificationManager;
     this.fileManager          = fileManager;
 }
コード例 #21
0
ファイル: PostsController.cs プロジェクト: neistow/ForumCore
 public PostsController(UserManager <User> userManager, IPostManager postManager, IMapper mapper,
                        ITagManager tagManager)
 {
     _userManager = userManager;
     _postManager = postManager;
     _tagManager  = tagManager;
     _mapper      = mapper;
 }
コード例 #22
0
 /// <summary>
 /// 构造函数
 ///</summary>
 public BlogAppService(IRepository <Blog, Guid> blogRepository, IBlogManager blogManager, BlogListExcelExporter blogListExcelExporter, ITagManager tagManager, IRepository <BlogTag, int> blogTagRepository)
 {
     _blogRepository        = blogRepository;
     _blogManager           = blogManager;;
     _blogListExcelExporter = blogListExcelExporter;
     _tagManager            = tagManager;
     _blogTagRepository     = blogTagRepository;
 }
コード例 #23
0
 public AggregationService(IAgregationManager agregationManager, ITimeManager timeManager, ITagManager tagManager, ICateringManager cateringManager, ICustomerManager customerManager)
 {
     _agregationManager = agregationManager;
     _timeManager       = timeManager;
     _tagManager        = tagManager;
     _cateringManager   = cateringManager;
     _customerManager   = customerManager;
 }
コード例 #24
0
 public IowVariableAppService(
     IIowManager iowManager,
     ITagManager tagManager,
     ILocalizationManager localizationManager)
 {
     _iowManager = iowManager;
     _tagManager = tagManager;
     _localizationManager = localizationManager;
 }
コード例 #25
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GitTag"/> class.
        /// </summary>
        /// <param name="tagManager">The tag manager to get tag information.</param>
        /// <param name="name">The name of the tag.</param>
        /// <param name="shaShort">A abbreviated SHA id.</param>
        /// <param name="sha">The SHA id.</param>
        /// <param name="dateTime">The date time the tag was created.</param>
        public GitTag(ITagManager tagManager, string name, string shaShort, string sha, DateTime dateTime)
        {
            Name     = name;
            Sha      = sha;
            ShaShort = shaShort;
            DateTime = dateTime;

            Message = tagManager.GetMessage(this);
        }
コード例 #26
0
 public EntityTagAdminAppService(
     ITagDefinitionStore tagDefinitionStore,
     IEntityTagManager entityTagManager,
     ITagManager tagManager)
 {
     _tagDefinitionStore = tagDefinitionStore;
     _entityTagManager   = entityTagManager;
     _tagManager         = tagManager;
 }
コード例 #27
0
 public TagAppService(
     ITagManager tagManager,
     ITagRepository tagRepository,
     IEntityTagRepository entityTagRepository)
 {
     TagManager          = tagManager;
     TagRepository       = tagRepository;
     EntityTagRepository = entityTagRepository;
 }
コード例 #28
0
ファイル: GitTag.cs プロジェクト: wdichler/ReactiveGit
        /// <summary>
        /// Initializes a new instance of the <see cref="GitTag"/> class.
        /// </summary>
        /// <param name="tagManager">The tag manager to get tag information.</param>
        /// <param name="name">The name of the tag.</param>
        /// <param name="shaShort">A abbreviated SHA id.</param>
        /// <param name="sha">The SHA id.</param>
        /// <param name="dateTime">The date time the tag was created.</param>
        public GitTag(ITagManager tagManager, string name, string shaShort, string sha, DateTime dateTime)
        {
            this.Name       = name;
            this.tagManager = tagManager;
            this.Sha        = sha;
            this.ShaShort   = shaShort;
            this.DateTime   = dateTime;

            this.message = new Lazy <string>(() => this.tagManager.GetMessage(this));
        }
コード例 #29
0
        public TagManager_Tests()
        {
            tagManager = Resolve <ITagManager>();

            tagAppService       = Resolve <ITagAppService>();
            tagRepository       = Resolve <ITagRepository>();
            metaEntityManager   = Resolve <IMetaEntityManager>();
            tagTargetManager    = Resolve <ITagTargetManager>();
            tagTargetRepository = Resolve <ITagTargetRepository>();
        }
コード例 #30
0
        public TagManagerTests()
        {
            var kernel = new StandardKernel(new BllBindings());

            kernel.Load(Assembly.GetExecutingAssembly());
            _tagManager = kernel.Get <ITagManager>();
            _testTag    = new Tag {
                Id = 1, Name = "Subaru"
            };
        }
コード例 #31
0
 public SampleTagsService(
     ITagManager <TagBase> tagManager,
     IContextFacade contextFacade,
     IFeatureFacade featureFacade,
     IDbHelper dbHelper)
 {
     _featureFacade = featureFacade;
     _contextFacade = contextFacade;
     _tagManager    = tagManager;
     _dbHelper      = dbHelper;
 }
コード例 #32
0
 /// <summary>
 /// 构造函数
 ///</summary>
 public PostAppService(IRepository <Post, Guid> postRepository, IPostManager postManager, PostListExcelExporter postListExcelExporter, IEnumExtensionsAppService enumExtensionsAppService, ITagManager tagManager, ICommentManager commentManager, IRepository <PostTag, int> postTagRepository, IBlogManager blogManager)
 {
     _postRepository           = postRepository;
     _postManager              = postManager;;
     _postListExcelExporter    = postListExcelExporter;
     _enumExtensionsAppService = enumExtensionsAppService;
     _tagManager        = tagManager;
     _commentManager    = commentManager;
     _postTagRepository = postTagRepository;
     _blogManager       = blogManager;
 }
 public AccountController(
     IAccountManager accountManager,
     IProfileManager profileManager,
     ITagManager tagManager,
     SignInManager <ApplicationUser> signInManager)
 {
     _accountManager = accountManager ?? throw new ArgumentNullException(nameof(accountManager));
     _profileManager = profileManager ?? throw new ArgumentNullException(nameof(profileManager));
     _tagManager     = tagManager ?? throw new ArgumentNullException(nameof(tagManager));
     _signInManager  = signInManager ?? throw new ArgumentNullException(nameof(signInManager));
 }
 public ProfileController(
     IAccountManager accountManager,
     IProfileManager profileManager,
     IOrderManager orderManager,
     ITagManager tagManager)
 {
     _accountManager = accountManager ?? throw new ArgumentNullException(nameof(accountManager));
     _profileManager = profileManager ?? throw new ArgumentNullException(nameof(profileManager));
     _orderManager   = orderManager ?? throw new ArgumentNullException(nameof(orderManager));
     _tagManager     = tagManager ?? throw new ArgumentNullException(nameof(tagManager));
 }
コード例 #35
0
		public FilterStoresViewModel(IStoreManager storeManager,
		                             IStoreCategoryManager categoryManager,
		                             ICountryManager countryManager, 
		                             ICityManager cityManager, 
		                             ITagManager tagManager)
			: base()
		{
			this._storeManager = storeManager;
			this._tagManager = tagManager;
			this._cityManager = cityManager;
			this._countryManager = countryManager;
			this._categoryManager = categoryManager;
			this.StoreFilter.PropertyChanged += StoreFilter_PropertyChanged;
		}
コード例 #36
0
 public FilterProductsViewModel(IProductManager productManager,
                                IProductCategoryManager categoryManager,
                                IProductSubcategoryManager subcategoryManager,
                                ICountryManager countryManager,
                                ICityManager cityManager,
                                ITagManager tagManager)
     : base()
 {
     this._productManager = productManager;
     this._tagManager = tagManager;
     this._cityManager = cityManager;
     this._countryManager = countryManager;
     this._subcategoryManager = subcategoryManager;
     this._categoryManager = categoryManager;
     this.ProductFilter.PropertyChanged += ProductFilter_PropertyChanged;
     this.ProductFilter.Tags.CollectionChanged += tagsChanged;
 }
コード例 #37
0
 public NewTagViewModel(ITagManager tagManager)
 {
     _tagManager = tagManager;            
 }
コード例 #38
0
 public DeleteTagsViewModel(ITagManager tagManager, IEnumerable<Tag> tagsToDelete)
 {
     _tagManager = tagManager;
     _tagsToDelete = tagsToDelete;
     HasTags = _tagsToDelete.Any();
 }
コード例 #39
0
 public TagAppService(ITagRepository tagRepository, ITagManager tagManager)
 {
     _tagRepository = tagRepository;
     _tagManager = tagManager;
 }
コード例 #40
0
 public TagDataAppService(ITagManager tagManager)
 {
     _tagManager = tagManager;
 }