public Repository(IModelFactory factory)
 {
     _tenantInteraction = new Lazy<ITenantInteractionRepository>(() => new TenantInteractionRepository(factory.TenantInteraction), true);
     _tenant = new Lazy<ITenantRepository>(() => new TenantRepository(_tenantInteraction, factory.Tenant), true);
     _door = new Lazy<IDoorRepository>(() => new DoorRepository(_tenant, factory.Door), true);
     _building = new Lazy<IBuildingRepository>(()=>new BuildingRepository(_door, factory.Building), true);
 }
示例#2
0
 protected ConsumerBase(IModelFactory modelFactory, string queueName, Action<Exception, string> onError)
 {
     _modelFactory = modelFactory;
     _queueName = queueName;
     _onError = onError;
     _isRunning = true;
 }
 public CandidateService(ICandidateRepository candidateRepository,
     IModelFactory modelFactory, IFileRepository fileRepository)
 {
     _candidateRepository = candidateRepository;
     _modelFactory = modelFactory;
     _fileRepository = fileRepository;
 }
 public TopologyBootstrapper(
     IModelFactory modelFactory, 
     IEnumerable<ExchangeConfig> exchanges, 
     IEnumerable<QueueConfig> queueConfigs)
 {
     _modelFactory = modelFactory;
     _exchanges = exchanges;
     _queueConfigs = queueConfigs;
 }
 public QuizService(IModelFactory modelFactory, IQuizRepository quizRepository, IQuizQuestionRepository quizQuestionRepository,
     IQuestionRepository questionRepository, ICourseRepository courseRepository, IQuizPagesRepository quizPagesRepository)
 {
     _modelFactory = modelFactory;
     _quizRepository = quizRepository;
     _quizQuestionRepository = quizQuestionRepository;
     _questionRepository = questionRepository;
     _courseRepository = courseRepository;
     _quizPagesRepository = quizPagesRepository;
 }
 public UserService(IEducationRepository educationRepository, IModelFactory modelFactory, IFileRepository fileRepository, ISkillRepository skillRepository,
     IProjectRepository projectRepository, IExperienceRepository experienceRepository)
 {
     _educationRepository = educationRepository;
     _modelFactory = modelFactory;
     _fileRepository = fileRepository;
     _skillRepository = skillRepository;
     _projectRepository = projectRepository;
     _experienceRepository = experienceRepository;
 }
		public MainPageViewModel(ICurrencyConverterService currencyConverter, 
			ICurrencyListService currencyList, 
			IAnalyticsService analyticsService,
			INavigationCache navigationCache,
			IModelFactory modelFactory) 
			: base(analyticsService, navigationCache)
		{
			_currencyConverter = currencyConverter;
			_currencyList = currencyList;
			_modelFactory = modelFactory;

			SetSelectedCurrenciesIfPossible();
		}
示例#8
0
 public StudentSystemApiController(IStudentSystemData data, IModelFactory models)
 {
     this.data   = data;
     this.models = models;
 }
 public void Initialize()
 {
     _modelFactory = new ModelFactory();
     counts        = _modelFactory.GetSingleCountModel(countSize);
 }
示例#10
0
 public BasicConsumer(IMessageHandler handler, 
     IModelFactory modelFactory, string queueName, Action<Exception, string> onError)
     : base(modelFactory, queueName, onError)
 {
     _handler = handler;
 }
示例#11
0
 protected BaseApiController(IModelFactory modelFactory, IGameService gameService)
 {
     _modelFactory = modelFactory;
     _service = gameService;
 }
示例#12
0
 public NeedController(IModelFactory<iServeDBProcedures> modelFactory, User currentUser)
     : base(currentUser)
 {
     Model = modelFactory;
 }
示例#13
0
 public UsersController(IUserService userService, IModelFactory modelFactory)
 {
     _userService  = userService;
     _modelFactory = modelFactory;
 }
示例#14
0
 public ViewsConvention(ICodeGeneratorService codeGeneratorService, IModelFactory factory)
 {
     this.factory = factory;
     this.codeGeneratorService = codeGeneratorService;
 }
示例#15
0
        /// <summary>
        /// Processes the Uri specified by <paramref name="targetUri"/> as a potential link to be crawled,
        /// bypassed, or ignored.
        /// </summary>
        /// <param name="page">The CrawledPage from which the targetUri was parsed.</param>
        /// <param name="factory">An instance of IModelFactory</param>
        /// <param name="targetUri">The target Uri being processed</param>
        internal void ProcessLink(Abot.Poco.CrawledPage page, IModelFactory factory, Uri targetUri, int sessionId, int crawlerId)
        {
            CrawledLink bypassedLink = null;

            if (targetUri.Scheme == Uri.UriSchemeMailto)
            {
                // Mailto schema: bypass
                bypassedLink = factory.CreateCrawledLink(page.Uri, targetUri, sessionId, crawlerId);
                bypassedLink.IsRoot = false;
                bypassedLink.CrawlDepth = page.CrawlDepth + 1;
                bypassedLink.StatusCode = HttpStatusCode.OK;
                bypassedLink.Bypassed = true;
                LinksToByPass.Add(bypassedLink);
            }
            else if (string.Compare(page.Uri.AbsoluteUri, targetUri.AbsoluteUri) == 0)
            {
                // Exact self loops: bypass
                bypassedLink = factory.CreateCrawledLink(page.Uri, targetUri, sessionId, crawlerId);
                bypassedLink.IsRoot = false;
                bypassedLink.CrawlDepth = page.CrawlDepth + 1;
                bypassedLink.StatusCode = HttpStatusCode.OK;
                bypassedLink.Bypassed = true;
                LinksToByPass.Add(bypassedLink);
            }
            else if (MapOfLinksToCrawl.ContainsKey(targetUri.AbsoluteUri))
            {
                // Duplicates: bypass
                bypassedLink = factory.CreateCrawledLink(page.Uri, targetUri, sessionId, crawlerId);
                bypassedLink.IsRoot = false;
                bypassedLink.CrawlDepth = page.CrawlDepth + 1;
                bypassedLink.StatusCode = HttpStatusCode.OK;
                bypassedLink.Bypassed = true;
                LinksToByPass.Add(bypassedLink);
            }
            else
            {
                // process link to be crawled that was parsed from a crawled page, so
                // it will not be a root.
                var link = factory.CreateLinkToCrawl(page, targetUri, sessionId);
                MapOfLinksToCrawl.Add(targetUri.AbsoluteUri, link);

                if (string.Compare(page.Uri.GetBaseDomain(), targetUri.GetBaseDomain(), true) != 0)
                    ExternalLinksFound |= true;
            }
        }
示例#16
0
 public UnitTestsConvention(ICodeGeneratorService codeGeneratorService, IModelFactory factory)
 {
     this.codeGeneratorService = codeGeneratorService;
     this.factory = factory;
 }
示例#17
0
 public NeedController(IModelFactory<iServeDBProcedures> modelFactory)
 {
     Model = modelFactory;
 }
 public QuestionService(IModelFactory modelFactory, IQuestionRepository questionRepository, IFileRepository fileRepository)
 {
     _modelFactory = modelFactory;
     _questionRepository = questionRepository;
     _fileRepository = fileRepository;
 }
示例#19
0
 private void InvokeFactory()
 {
     if (_factory != null) {
         try {
             _modelFactory = (IModelFactory)Activator.CreateInstance(_factory);
         } catch (Exception ex) {
             throw new ArgumentException(String.Format("Could not create factory for type '{0}'", _factory.Name), ex);
         }
     }
 }
示例#20
0
 public MessageMapper(IModelFactory modelFactory)
 {
     _modelFactory = modelFactory;
 }
 public ComponentController(IModelFactory ModelFactory)
 {
     this.ModelFactory = ModelFactory;
 }
示例#22
0
 protected BaseApiController(IStatsService statsService, IModelFactory modelFatory)
 {
     this.service      = statsService;
     this.modelFactory = modelFatory;
 }
示例#23
0
 public TripController(IWorldRepository repository, ILogger<TripController> logger, IModelFactory modelFactory)
     : base(repository,logger,modelFactory)
 {
 }
 public AutofacModelBinderProvider(IModelFactory modelFactory)
 {
     if (modelFactory == null)
         throw new ArgumentNullException("modelFactory");
     _modelFactory = modelFactory;
 }
示例#25
0
        /// <summary>
        /// Validates the selected nodes <paramref name="nodesCollection"/> and export it using <paramref name="exportModelFactory"/>.
        /// </summary>
        /// <param name="nodesCollection">The items <see cref="IEnumerable{IUANodeBase}" /> imported to the Address Space <see cref="IAddressSpaceContext" />.</param>
        /// <param name="exportModelFactory">The model export factory.</param>
        /// <param name="addressSpaceContext">The Address Space context.</param>
        /// <param name="traceEvent">The trace event method encapsulation.</param>
        internal static void ValidateExportModel(IEnumerable <IUANodeBase> nodesCollection, IModelFactory exportModelFactory, IAddressSpaceValidationContext addressSpaceContext, Action <TraceMessage> traceEvent)
        {
            traceEvent(TraceMessage.DiagnosticTraceMessage(string.Format("Entering Validator.ValidateExportModel - starting creation of the ModelDesign for {0} nodes.", nodesCollection.Count <IUANodeBase>())));
            List <BuildError> _errors = new List <BuildError>(); //TODO should be added to the model;

            foreach (IModelTableEntry _ns in addressSpaceContext.ExportNamespaceTable)
            {
                string _publicationDate = _ns.PublicationDate.HasValue ? _ns.PublicationDate.Value.ToShortDateString() : DateTime.UtcNow.ToShortDateString();
                string _version         = _ns.Version;
                exportModelFactory.CreateNamespace(_ns.ModelUri, _publicationDate, _version);
            }
            string _msg = null;
            int    _nc  = 0;

            foreach (IUANodeBase _item in nodesCollection)
            {
                try
                {
                    ValidateExportNode(_item, exportModelFactory, null, y =>
                    {
                        if (y.TraceLevel != TraceEventType.Verbose)
                        {
                            _errors.Add(y.BuildError);
                        }
                        traceEvent(y);
                    });
                    _nc++;
                }
                catch (Exception _ex)
                {
                    _msg = string.Format("Error caught while processing the node {0}. The message: {1} at {2}.", _item.UANode.NodeId, _ex.Message, _ex.StackTrace);
                    traceEvent(TraceMessage.BuildErrorTraceMessage(BuildError.NonCategorized, _msg));
                }
            }
            if (_errors.Count == 0)
            {
                _msg = string.Format("Finishing Validator.ValidateExportModel - the model contains {0} nodes.", _nc);
            }
            else
            {
                _msg = string.Format("Finishing Validator.ValidateExportModel - the model contains {0} nodes and {1} errors.", _nc, _errors.Count);
            }
            traceEvent(TraceMessage.DiagnosticTraceMessage(_msg));
        }
示例#26
0
 public StopController(IWorldRepository repository, ILogger<StopController> logger, IModelFactory modelFactory, CoordService coordService)
     : base(repository,logger,modelFactory)
 {
     _coordService = coordService; 
 }
 public UserManager(IModelFactory modelFactory, IUserStore<ApplicationUser> store,IEmailPlugin emailPlugin)
     : base(store)
 {
     _modelFactory = modelFactory;
 }
示例#28
0
 public ViewsConvention(ICodeGeneratorService codeGeneratorService, IModelFactory factory)
 {
     this.factory = factory;
     this.codeGeneratorService = codeGeneratorService;
 }
 public PlayerController( ) {
     _service = new StatsService( );
     _modelFactory = new ModelFactory( );
 }
示例#30
0
 public ControllersConvention(ICodeGeneratorService codeGeneratorService, IModelFactory factory)
 {
     this.codeGeneratorService = codeGeneratorService;
     this.factory = factory;
 }
 public AccountController(IModelFactory<iServeDBProcedures> modelFactory, PersonAPI personAPI, OAuthUtil oauthHelper)
 {
     Model = modelFactory;
     PersonAPI = PersonAPI;
     OAuthHelper = oauthHelper;
 }
示例#32
0
 public BaseController(IWorldRepository repository, ILogger<BaseController> logger, IModelFactory modelFactory)
 {
     _repository = repository;
     _logger = logger;
     _modelFactory = modelFactory;
 }
示例#33
0
 public RabbitMqManager(IModelFactory modelFactory)
 {
     _modelFactory = modelFactory;
 }
示例#34
0
 public TagsController(ITagService tagService, IModelFactory modelFactory) : base(modelFactory)
 {
     _tagService = tagService;
 }
示例#35
0
 // ========================================
 // constructor
 // ========================================
 public CreateNodeCommand(IEditor target, IModelFactory modelFactory, Rectangle bounds)
 {
     _target       = target;
     _modelFactory = modelFactory;
     _bounds       = bounds;
 }
示例#36
0
 public ClientService(IUnitOfWork unitOfWork, [Named("ClientFactory")] IModelFactory modelFactory, IGenerator generator,
                      ICustomException customException, HttpRequestMessage request)
     : base(unitOfWork, modelFactory, customException, request)
 {
     Generator = generator;
 }
 public ComponentController(IModelFactory ModelFactory)
 {
     this.ModelFactory = ModelFactory;
 }
 public CreateMemberHandler(IMemberRepository memberRepository, IModelFactory factory)
 {
     _memberRepository = memberRepository;
     _factory          = factory;
 }
示例#39
0
 public TextStore(FingerprintLite13Entities db, IModelFactory modelFactory)
 {
     _db           = db;
     _modelFactory = modelFactory;
 }
示例#40
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EstateManagementRepository"/> class.
 /// </summary>
 /// <param name="contextFactory">The context factory.</param>
 /// <param name="modelFactory">The model factory.</param>
 public EstateManagementRepository(Shared.EntityFramework.IDbContextFactory <EstateReportingContext> contextFactory,
                                   IModelFactory modelFactory)
 {
     this.ContextFactory = contextFactory;
     this.ModelFactory   = modelFactory;
 }
 public AcceptInviteHandler(IUnitOfWork unit, IModelFactory factory)
 {
     _unit    = unit;
     _factory = factory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiResourceController" /> class.
 /// </summary>
 /// <param name="manager">The manager.</param>
 /// <param name="modelFactory">The model factory.</param>
 public IdentityResourceController(ISecurityServiceManager manager,
                                   IModelFactory modelFactory)
 {
     this.Manager      = manager;
     this.ModelFactory = modelFactory;
 }
示例#43
0
 public static void SetModelFactory(string id, IModelFactory val)
 {
     modelFactorys[id] = val;
 }
示例#44
0
 public MemberRepository(IMemberDao memberDao, IModelFactory modelFactory)
 {
     _memberDao    = memberDao;
     _modelFactory = modelFactory;
 }
示例#45
0
 public CarFactoryTests()
 {
     makeFactory  = new MakeFactory();
     modelFactory = new ModelFactory(makeFactory);
     carFactory   = new CarFactory(modelFactory, makeFactory);
 }
 public RecruitmentService(ApplicationContext context,
                           IModelFactory <RecruitmentInformationDto, RecruitmentInformation> modelFactory)
 {
     _context      = context;
     _modelFactory = modelFactory;
 }
 public QuestionService(IModelFactory modelFactory, IQuestionRepository questionRepository, IFileRepository fileRepository)
 {
     _modelFactory = modelFactory;
     _questionRepository = questionRepository;
     _fileRepository = fileRepository;
 }
示例#48
0
 public AccountController(IAuthenticator authenticator, IModelFactory modelFactory)
 {
     _authenticator = authenticator;
     _modelFactory = modelFactory;
 }
 protected AbstractScanner(ModuleDefinition module, IModelFactory factory, ILogger logger)
 {
     Module  = module;
     Factory = factory;
     Logger  = logger;
 }
示例#50
0
 public Context(IDataSourceFactory datasourceFactory, IModelFactory modelFactory)
 {
     _datasource   = datasourceFactory.GetCurrent();
     _modelFactory = modelFactory;
 }
 public void Initialize()
 {
     _modelFactory        = new ModelFactory();
     singleWordCountModel = _modelFactory.GetSingleCountModel(new int[] { 3, 5, 4, 7, 6 });
 }
 public TypeScanner(ModuleDefinition module, IModelFactory factory, ILogger logger)
     : base(module, factory, logger)
 {
 }
示例#53
0
 public CityFactory(HttpRequestMessage request, [Named("StateFactory")] IModelFactory stateFactory) : base(request)
 {
     _stateFactory = stateFactory;
 }
 public CategoryController()
 {
     _secRepository     = new SectionRepository();
     _modelFactory      = new ModelFactory();
     _annonceRepository = new AnnoncesRepository();
 }
 public StudentsController(IStudentSystemData data, IModelFactory models)
     : base(data, models)
 {
 }
示例#56
0
 public EventFactory(HttpRequestMessage request, [Named("CityFactory")] IModelFactory cityEventFactory, [Named("CategoryFactory")] IModelFactory categoryFactory) : base(request)
 {
     _cityEventFactory = cityEventFactory;
     _categoryFactory  = categoryFactory;
 }
 public StudentSystemApiController(IStudentSystemData data, IModelFactory models)
 {
     this.data = data;
     this.models = models;
 }
示例#58
0
 public ErrorLogService(IUnitOfWork unitOfWork, [Named("ErrorLogFactory")] IModelFactory modelFactory,
                        ICustomException customException, HttpRequestMessage request)
     : base(unitOfWork, modelFactory, customException, request)
 {
 }
 public QuestionCategoryService(IQuestionCategoryRepository questionCategoryRepository, IModelFactory modelFactory)
 {
     _questionCategoryRepository = questionCategoryRepository;
     _modelFactory = modelFactory;
 }
示例#60
0
 public ModelManager()
 {
     factory    = new ModelFactory();
     repository = new ModelRepository();
     modifier   = new ModelModifier();
 }