public void WordConverterTestInit()
        {
            _dictionaryMapper = new FileDictionaryMapper()
            {
                FileName = Path.GetFullPath(@"..\..\..\WordTowordConverter\dictionary.txt"),
                NeedSort = false
            };

            _task = _dictionaryMapper.Load();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FirestoreRepository{T}"/> class.
        /// </summary>
        /// <param name="mapper">An instance of <see cref="IDictionaryMapper{T}"/> to map between the domain entity and the Firestore document.</param>
        public FirestoreRepository(IOptions <FirestoreOptions> options, IDictionaryMapper <T> mapper)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            Db         = FirestoreDb.Create(options.Value.ProjectId);
            Collection = Db.Collection(typeof(T).Name);
            Mapper     = mapper;
        }