Exemple #1
0
 public void TestInit()
 {
     _mockUpload         = Substitute.For <IFileUpload>();
     _mockIconRepository = Substitute.For <IIconRepository>();
     _mockFileManager    = Substitute.For <IFileManager>();
     _manager            = new IconManager(_mockUpload, _mockIconRepository, _mockFileManager);
 }
Exemple #2
0
 public MoBiSpatialStructureFactory(IObjectBaseFactory objectBaseFactory, IParameterFactory parameterFactory, IIconRepository iconRepository, IDiagramManagerFactory diagramManagerFactory) : base(objectBaseFactory)
 {
     _objectBaseFactory     = objectBaseFactory;
     _parameterFactory      = parameterFactory;
     _iconRepository        = iconRepository;
     _diagramManagerFactory = diagramManagerFactory;
 }
Exemple #3
0
 /// <summary>
 /// 初始化图标管理器
 /// </summary>
 /// <param name="fileUpload">文件上传操作</param>
 /// <param name="iconRepository">图标仓储</param>
 /// <param name="fileManager">文件管理器</param>
 public IconManager(IFileUpload fileUpload, IIconRepository iconRepository, IFileManager fileManager)
 {
     FileUpload = fileUpload;
     FileUpload.UploadPathStrategy = new DefaultUploadPathStrategy();
     IconRepository = iconRepository;
     FileManager    = fileManager;
 }
        public SelectManyUsersForm(IGitUserManager gitUserManager, IIconRepository iconRepository, NotifyIcon notifyIcon)
        {
            this.gitUserManager = gitUserManager;
            this.iconRepository = iconRepository;
            this.notifyIcon     = notifyIcon;

            InitializeComponent();
            InitializeUsersListBox();
        }
Exemple #5
0
        public CustomApplicationContext(IGitUserManager gitUserManager, IOptionsManager optionsManager, IIconRepository iconRepository, IProcessKiller processKiller)
        {
            this.gitUserManager = gitUserManager;
            this.optionsManager = optionsManager;
            this.iconRepository = iconRepository;
            this.processKiller  = processKiller;

            InitializeTrayIcon();
        }
Exemple #6
0
        public UnitOfWork(TaskItDbContext taskItDbContext, IUserRepository userRepository, IGroupRepository groupRepository, ISubscriptionRepository subscriptionRepository, IColorRepository colorRepository, IIconRepository iconRepository)
        {
            _taskItDbContext = taskItDbContext;

            UserRepository         = userRepository;
            GroupRepository        = groupRepository;
            SubscriptionRepository = subscriptionRepository;
            ColorRepository        = colorRepository;
            IconRepository         = iconRepository;
        }
Exemple #7
0
 protected override void Context()
 {
     _objectBaseFactory = A.Fake <IObjectBaseFactory>();
     _parameterFactory  = A.Fake <IParameterFactory>();
     _iconRepository    = A.Fake <IIconRepository>();
     _volumeParameter   = A.Fake <IParameter>().WithName(Constants.Parameters.VOLUME);
     A.CallTo(() => _parameterFactory.CreateVolumeParameter()).Returns(_volumeParameter);
     _spatialStructure = new MoBiSpatialStructure();
     A.CallTo(() => _objectBaseFactory.Create <IMoBiSpatialStructure>()).Returns(_spatialStructure);
     A.CallTo(() => _objectBaseFactory.Create <IContainer>()).ReturnsLazily(x => new Container());
     _diagramManagerFactory = A.Fake <IDiagramManagerFactory>();
     sut = new MoBiSpatialStructureFactory(_objectBaseFactory, _parameterFactory, _iconRepository, _diagramManagerFactory);
 }
Exemple #8
0
 public InteractionTask(ISerializationTask serializationTask, IDialogCreator dialogCreator, IIconRepository iconRepository,
                        INameCorrector nameCorrector, IObjectBaseTask objectBaseTask, ICloneManagerForBuildingBlock cloneManagerForBuildingBlock,
                        IAdjustFormulasVisitor adjustFormulasVisitor, IObjectTypeResolver objectTypeResolver, IForbiddenNamesRetriever forbiddenNamesRetriever)
 {
     _serializationTask            = serializationTask;
     _dialogCreator                = dialogCreator;
     _iconRepository               = iconRepository;
     _nameCorrector                = nameCorrector;
     _objectBaseTask               = objectBaseTask;
     _cloneManagerForBuildingBlock = cloneManagerForBuildingBlock;
     _adjustFormulasVisitor        = adjustFormulasVisitor;
     _objectTypeResolver           = objectTypeResolver;
     _forbiddenNamesRetriever      = forbiddenNamesRetriever;
 }
Exemple #9
0
 public BuildingBlockMergePresenter(IBuildingBlockMergeView view, IDialogCreator dialogCreator,
                                    IMergeTask mergeTask, IBuildingBlockRepository buildingBlockRepository,
                                    IIconRepository iconRepository, ISerializationTask serializationTask) : base(view)
 {
     _cancellationTokenSource = new CancellationTokenSource();
     _dialogCreator           = dialogCreator;
     _mergeTask = mergeTask;
     _buildingBlockRepository  = buildingBlockRepository;
     _allBuildingBlockMappings = new List <BuildingBlockMappingDTO>();
     _noneBuildingBlock        = new NullBuildingBlock(AppConstants.None);
     _importAsNewBuildingBlock = new NullBuildingBlock(AppConstants.Captions.ImportAsNew);
     _iconRepository           = iconRepository;
     _serializationTask        = serializationTask;
 }
        protected override void Context()
        {
            _serializationTask            = A.Fake <ISerializationTask>();
            _dialogCreator                = A.Fake <IDialogCreator>();
            _iconRepository               = A.Fake <IIconRepository>();
            _nameCorrector                = A.Fake <INameCorrector>();
            _objectBaseTask               = A.Fake <IObjectBaseTask>();
            _cloneManagerForBuildingBlock = A.Fake <ICloneManagerForBuildingBlock>();
            _adjustFormulasVisitor        = A.Fake <IAdjustFormulasVisitor>();
            _objectTypeResolver           = A.Fake <IObjectTypeResolver>();
            _forbiddenNamesRetriever      = A.Fake <IForbiddenNamesRetriever>();

            sut = new InteractionTask(_serializationTask, _dialogCreator, _iconRepository, _nameCorrector, _objectBaseTask, _cloneManagerForBuildingBlock, _adjustFormulasVisitor, _objectTypeResolver, _forbiddenNamesRetriever);
        }
Exemple #11
0
 public DropDownController(IIconRepository iconRepository, IProductRepository productRepository, IProductCategoryRepository productCategoryRepository, IUserService userService,
                           IDepartmentRoleRepository departmentRoleRepository, IDatabaseRepository databaseRepository, ICustomFieldRepository customFieldRepository, IDepartmentRepository departmentRepository,
                           IIssueTypeRepository issueTypeRepository, ITicketTypeRepository ticketTypeRepository, IEmailTemplateRepository emailTemplateRepository,
                           ICustomerPriorityRepository customerPriorityRepository, ITicketStatusRepository ticketStatusRepository, ITicketRepository ticketRepository)
 {
     _iconRepository           = iconRepository;
     _productRepository        = productRepository;
     _departmentRoleRepository = departmentRoleRepository;
     _userService = userService;
     _productCategoryRepository  = productCategoryRepository;
     _databaseRepository         = databaseRepository;
     _customFieldRepository      = customFieldRepository;
     _departmentRepository       = departmentRepository;
     _issueTypeRepository        = issueTypeRepository;
     _ticketTypeRepository       = ticketTypeRepository;
     _emailTemplateRepository    = emailTemplateRepository;
     _customerPriorityRepository = customerPriorityRepository;
     _ticketStatusRepository     = ticketStatusRepository;
     _ticketRepository           = ticketRepository;
 }
Exemple #12
0
 public IconsController(IIconRepository iconRepository)
 {
     _iconRepository = iconRepository;
 }
Exemple #13
0
 public ContainerToContainerDTOMapper(ITagToTagDTOMapper tagDTOMapper, IIconRepository iconRepository)
 {
     _tagDTOMapper   = tagDTOMapper;
     _iconRepository = iconRepository;
 }
Exemple #14
0
 public ContainerToContainerDTOMapper(IIconRepository iconRepository)
 {
     _iconRepository = iconRepository;
 }
Exemple #15
0
 public WeatherSummaryViewModel(WeatherSummary summary, HttpContextBase context, IIconRepository repository)
 {
     Timezone            = summary.Timezone;
     Summary             = summary.Summary;
     Icon                = UrlHelper.GenerateContentUrl(string.Format("{0}{1}", "/Content/Images/", repository.GetIcon(summary.Icon)), context);
     Temperature         = string.Format("{0}°C", summary.Temperature.ToString("0.0", CultureInfo.InvariantCulture));
     ApparentTemperature = string.Format("{0}°C", summary.ApparentTemperature.ToString("0.0", CultureInfo.InvariantCulture));
     IsOk                = true;
     ErrorMessage        = string.Empty;
 }
Exemple #16
0
 /// <summary>
 /// 初始化图标服务
 /// </summary>
 /// <param name="unitOfWork">工作单元</param>
 /// <param name="repository">图标仓储</param>
 /// <param name="iconManager">图标管理器</param>
 public IconService(IApplicationUnitOfWork unitOfWork, IIconRepository repository, IIconManager iconManager)
     : base(unitOfWork, repository)
 {
     Repository  = repository;
     IconManager = iconManager;
 }
 public IconLogic(IIconRepository repository)
 {
     _repository = repository;
 }
Exemple #18
0
 public NeighborhoodToDTONeighborhoodMapper(ITransportToTransportDTOMapper transportToTransportDTOMapper, IIconRepository iconRepository)
     : base(iconRepository)
 {
     _transportToTransportDTOMapper = transportToTransportDTOMapper;
 }
Exemple #19
0
 public IconController(IIconRepository iconRepository)
 {
     this.iconRepository = iconRepository;
 }