/// <summary>
		/// Builds and executes the query.
		/// </summary>
		/// <param name="context">The request context.</param>
		/// <param name="arguments">The arguments from which to build the query.</param>
		/// <param name="repository">The <see cref="IRepository"/>.</param>
		/// <param name="parser">The <see cref="IQueryParser"/>.</param>
		/// <returns>Returns the result.</returns>
		protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
		{
			// parse the query
			var query = parser.Parse(context, arguments);

			// execute and return the result
			return repository.RetrieveSingle(context, query);
		}
Exemplo n.º 2
0
		/// <summary>
		/// Builds and executes the query.
		/// </summary>
		/// <param name="context">The request context.</param>
		/// <param name="arguments">The arguments from which to build the query.</param>
		/// <param name="repository">The <see cref="IRepository"/>.</param>
		/// <param name="parser">The <see cref="IQueryParser"/>.</param>
		/// <returns>Returns the <see cref="RecordSet"/>.</returns>
		protected override RecordSet Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
		{
			// parse them into a query
			var query = parser.Parse(context, arguments);

			// execute the query
			return searcher.Search(context, query);
		}
		/// <summary>
		/// </summary>
		/// <param name="parser"></param>
		protected RetrieveRecordBaseTag(IQueryParser parser)
		{
			// validate arguments
			if (parser == null)
				throw new ArgumentNullException("parser");

			// set value
			this.parser = parser;
		}
Exemplo n.º 4
0
		/// <summary>
		/// </summary>
		/// <param name="searcher"></param>
		/// <param name="parser"> </param>
		public SearchTag(Searcher searcher, IQueryParser parser) : base(parser)
		{
			// validate arguments
			if (searcher == null)
				throw new ArgumentNullException("searcher");

			// set values
			this.searcher = searcher;
		}
        /// <summary>
        /// 
        /// </summary>
        /// <param name="parser"></param>
        /// <param name="portalService"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public RetrieveTemplatePageNodeTag(IQueryParser parser, IPortalService portalService)
            : base(parser)
        {
            // validate arguments
            if (portalService == null)
                throw new ArgumentNullException("portalService");

            // set values
            this.portalService = portalService;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="parser"></param>
        /// <param name="nodeUrlService"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public RetrieveNodeByUrlTag(IQueryParser parser, INodeUrlService nodeUrlService)
            : base(parser)
        {
            // validate arguments
            if (nodeUrlService == null)
                throw new ArgumentNullException("nodeUrlService");

            // set values
            this.nodeUrlService = nodeUrlService;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="parser"></param>
        /// <param name="typeService"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public RetrieveLayoutNodeTag(IQueryParser parser, ITypeService typeService)
            : base(parser)
        {
            // validate arguments
            if (typeService == null)
                throw new ArgumentNullException("typeService");

            // set values
            this.typeService = typeService;
        }
Exemplo n.º 8
0
    public void SetUp()
    {
      _mockRepository = new MockRepository();
      _queryParserMock = _mockRepository.StrictMock<IQueryParser> ();
      _executorMock = _mockRepository.StrictMock<IQueryExecutor> ();

      _queryProvider = new TestQueryProvider (_queryParserMock, _executorMock);
    
      _queryableWithDefaultParser = new TestQueryable<Cook> (QueryParser.CreateDefault(), _executorMock);
      _fakeQueryModel = ExpressionHelper.CreateQueryModel<Cook> ();
    }
        /// <summary>
        /// Builds and executes the query.
        /// </summary>
        /// <param name="context">The request context.</param>
        /// <param name="arguments">The arguments from which to build the query.</param>
        /// <param name="repository">The <see cref="IRepository"/>.</param>
        /// <param name="parser">The <see cref="IQueryParser"/>.</param>
        /// <returns>Returns the result.</returns>
        protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
        {
            // get the node
            var contentNode = GetRequiredAttribute<Node>(context, "source");
            var siteNode = GetRequiredAttribute<Node>(context, "siteNode");

            // resolve the template page node
            Node templatePageNode;
            portalService.TryResolveTemplatePage(context, siteNode, contentNode, out templatePageNode);
            return templatePageNode;
        }
		/// <summary>
		/// Builds and executes the query.
		/// </summary>
		/// <param name="context">The request context.</param>
		/// <param name="arguments">The arguments from which to build the query.</param>
		/// <param name="repository">The <see cref="IRepository"/>.</param>
		/// <param name="parser">The <see cref="IQueryParser"/>.</param>
		/// <returns>Returns the result.</returns>
		protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
		{
			// parse the query
			var query = parser.Parse(context, arguments);

			// make sure a child of clause is specified
			if (!query.HasSpecification<ChildOfSpecification>())
				throw new InvalidOperationException("The parent node was not specified.");

			// execute the query
			return repository.RetrieveSingleNode(context, query);
		}
        /// <summary>
        /// Builds and executes the query.
        /// </summary>
        /// <param name="context">The request context.</param>
        /// <param name="arguments">The arguments from which to build the query.</param>
        /// <param name="repository">The <see cref="IRepository"/>.</param>
        /// <param name="parser">The <see cref="IQueryParser"/>.</param>
        /// <returns>Returns the <see cref="RecordSet"/>.</returns>
        protected override RecordSet Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
        {
            // get the node
            var sourceNode = GetRequiredAttribute<Node>(context, "source");

            // retrieve the block nodes
            return repository.RetrieveNodeset(context, new PropertyBag
                                                       {
                                                       	{"baseType", "Block"},
                                                       	{"parentSource", sourceNode},
                                                       	{"status", NodeStatus.Published}
                                                       });
        }
Exemplo n.º 12
0
        // Not best solution but done for simplicity
        // Read first idea in Service project that would allow to avoid this hack
        public void Init(IQueryParser parser, IFileIndexer indexer)
        {
            if (parser == null)
                throw new ArgumentNullException("parser");

            if (indexer == null)
                throw new ArgumentNullException("indexer");

            if (_parser != null || _indexer != null)
                throw new InvalidOperationException("Cannot initialize index more than one time.");

            _parser = parser;
            _indexer = indexer;
        }
Exemplo n.º 13
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="typeService"></param>
		/// <param name="parser"> </param>
		/// <param name="repository"></param>
		/// <exception cref="ArgumentNullException"></exception>
		public SyncTablesTag(ITypeService typeService, IQueryParser parser, SqlServerRepository repository)
		{
			// validate arguments
			if (typeService == null)
				throw new ArgumentNullException("typeService");
			if (parser == null)
				throw new ArgumentNullException("parser");
			if (repository == null)
				throw new ArgumentNullException("repository");

			// set values
			this.typeService = typeService;
			this.parser = parser;
			this.repository = repository;
		}
        /// <summary>
        /// Builds and executes the query.
        /// </summary>
        /// <param name="context">The request context.</param>
        /// <param name="arguments">The arguments from which to build the query.</param>
        /// <param name="repository">The <see cref="IRepository"/>.</param>
        /// <param name="parser">The <see cref="IQueryParser"/>.</param>
        /// <returns>Returns the result.</returns>
        protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
        {
            // get the node
            var contentNode = GetRequiredAttribute<Node>(context, "source");

            //  get the page type
            var pageType = typeService.Load(context, "Page");

            // find the closest node pointer of type Page
            var pageNodePointer = contentNode.Pointer.HierarchyReverse.FirstOrDefault(x => typeService.Load(context, x.Type).IsAssignable(pageType));
            if (pageNodePointer == null)
                throw new InvalidOperationException(string.Format("Node '{0}' does not have a parent which is a Page", contentNode.Pointer.StructureString));

            // retrieve and return the parent node
            return repository.RetrieveSingleNode(context, new PropertyBag {{"id", pageNodePointer.Id}});
        }
        /// <summary>
        /// Builds and executes the query.
        /// </summary>
        /// <param name="context">The <see cref="IMansionContext"/>.</param>
        /// <param name="arguments">The arguments from which to build the query.</param>
        /// <param name="repository">The <see cref="IRepository"/>.</param>
        /// <param name="parser">The <see cref="IQueryParser"/>.</param>
        /// <returns>Returns the result.</returns>
        protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
        {
            // get the url
            Url url;
            if (!arguments.TryGet(context, "url", out url))
                url = context.Cast<IMansionWebContext>().Request.RequestUrl;

            // parse the query
            var query = parser.Parse(context, new PropertyBag
                                              {
                                              	{"baseType", "Site"},
                                              	{"hostHeaders", url.HostName}
                                              });

            // execute the query
            return repository.RetrieveSingleNode(context, query);
        }
		/// <summary>
		/// Builds and executes the query.
		/// </summary>
		/// <param name="context">The request context.</param>
		/// <param name="arguments">The arguments from which to build the query.</param>
		/// <param name="repository">The <see cref="IRepository"/>.</param>
		/// <param name="parser">The <see cref="IQueryParser"/>.</param>
		/// <returns>Returns the result.</returns>
		protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
		{
			// parse the query
			var query = parser.Parse(context, arguments);

			// make sure a child of clause is specified
			var parentOfSpecifications = query.Components.OfType<SpecificationQueryComponent>().Select(component => component.Specification).OfType<ParentOfSpecification>().ToArray();
			if (!parentOfSpecifications.Any())
				throw new InvalidOperationException("The child node was not specified.");

			// if there is a parent of specification for depth 0 it means a parent of the root node is queried, which does not exist
			if (parentOfSpecifications.Any(candidate => candidate.ChildPointer.Depth == 1))
				return null;

			// execute the query
			return repository.RetrieveSingleNode(context, query);
		}
        /// <summary>
        /// Builds and executes the query.
        /// </summary>
        /// <param name="context">The <see cref="IMansionContext"/>.</param>
        /// <param name="arguments">The arguments from which to build the query.</param>
        /// <param name="repository">The <see cref="IRepository"/>.</param>
        /// <param name="parser">The <see cref="IQueryParser"/>.</param>
        /// <returns>Returns the result.</returns>
        protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
        {
            // get the url
            Url url;
            if (!arguments.TryGet(context, "url", out url))
                url = context.Cast<IMansionWebContext>().Request.RequestUrl;

            // parse the URL for identifiers
            IPropertyBag queryAttributes;
            if (!nodeUrlService.TryExtractQueryParameters(context.Cast<IMansionWebContext>(), url, out queryAttributes))
                return null;

            // parse the query
            var query = parser.Parse(context, queryAttributes);

            // execute the query
            return repository.RetrieveSingleNode(context, query);
        }
        /// <summary>
        /// Builds and executes the query.
        /// </summary>
        /// <param name="context">The request context.</param>
        /// <param name="arguments">The arguments from which to build the query.</param>
        /// <param name="repository">The <see cref="IRepository"/>.</param>
        /// <param name="parser">The <see cref="IQueryParser"/>.</param>
        /// <returns>Returns the result.</returns>
        protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
        {
            // get the node
            var contentNode = GetRequiredAttribute<Node>(context, "source");

            // check if this node defines a theme
            string theme;
            if (contentNode.TryGet(context, "theme", out theme) && !string.IsNullOrEmpty(theme))
                return contentNode;

            // retrieve the parents of the current node
            var parentNodeset = repository.RetrieveNodeset(context, parser.Parse(context, new PropertyBag
                                                                                          {
                                                                                          	{"childSource", contentNode},
                                                                                          	{"baseType", "Page"},
                                                                                          	{"depth", "any"},
                                                                                          	{"sort", "depth DESC"}
                                                                                          }));

            return parentNodeset.Nodes.FirstOrDefault(parent => parent.TryGet(context, "theme", out theme) && !string.IsNullOrEmpty(theme));
        }
Exemplo n.º 19
0
 public QueryProcessor(ICommandRunner commandRunner, IQueryParser queryParser)
 {
     _commandRunner = commandRunner;
     _queryParser = queryParser;
 }
Exemplo n.º 20
0
 /// <summary>
 /// Constructor for normal use.
 /// </summary>
 public SceneQuery()
 {
     this.sceneTraversal = new SceneTraversal();
     this.queryParser    = new QueryParser(new QueryTokenizer());
 }
Exemplo n.º 21
0
        internal SpEntityQueryable(IQueryParser queryParser,
#if SP2013 || SP2016
                                   IQueryExecutor executor
Exemplo n.º 22
0
 public QuerySession(IDocumentStore store, IDocumentSchema schema, ISerializer serializer, IManagedConnection connection, IQueryParser parser, IIdentityMap identityMap)
 {
     DocumentStore = store;
     _schema       = schema;
     _serializer   = serializer;
     _connection   = connection;
     _parser       = parser;
     _identityMap  = identityMap;
 }
Exemplo n.º 23
0
 public RethinkQueryable(IQueryParser queryParser, IQueryExecutor executor) : base(queryParser, executor)
 {
 }
Exemplo n.º 24
0
 public virtual IFieldQueryBuilder PrepareBuilder(IQueryParser parser, string fieldName, JsonSchemaExtendedType type)
 {
     return(new FieldQueryBuilder(parser, fieldName, type));
 }
Exemplo n.º 25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionQueryable{T}"/> class.
 /// </summary>
 /// <param name="collection">The collection.</param>
 /// <param name="queryParser">The query parser.</param>
 /// <param name="executor">The executor.</param>
 /// <exception cref="ArgumentNullException"><paramref name="collection" /> is <see langword="null" />.</exception>
 public CollectionQueryable(ICouchbaseCollection collection, IQueryParser queryParser, IAsyncQueryExecutor executor)
     : base(new ClusterQueryProvider(queryParser, executor))
 {
     _collection = collection ?? throw new ArgumentNullException(nameof(collection));
 }
Exemplo n.º 26
0
        public DocumentSession(StoreOptions options, IDocumentSchema schema, ISerializer serializer, ICommandRunner runner, IQueryParser parser, IIdentityMap identityMap) : base(schema, serializer, runner, parser, identityMap)
        {
            _options    = options;
            _schema     = schema;
            _serializer = serializer;
            _runner     = runner;

            _identityMap = identityMap;
            _unitOfWork  = new UnitOfWork(_schema);

            if (_identityMap is IDocumentTracker)
            {
                _unitOfWork.AddTracker(_identityMap.As <IDocumentTracker>());
            }
        }
Exemplo n.º 27
0
        /// <summary>
        /// Parses an input string that contains Structured Query keywords (using Advanced Query Syntax
        /// or Natural Query Syntax) and produces a SearchCondition object.
        /// </summary>
        /// <param name="query">The query to be parsed</param>
        /// <param name="cultureInfo">The culture used to select the localized language for keywords.</param>
        /// <returns>Search condition resulting from the query</returns>
        /// <remarks>For more information on structured query syntax, visit http://msdn.microsoft.com/en-us/library/bb233500.aspx and
        /// http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/advquery.mspx</remarks>
        public static SearchCondition ParseStructuredQuery(string query, CultureInfo cultureInfo)
        {
            if (string.IsNullOrEmpty(query))
            {
                throw new ArgumentNullException("query");
            }
            else
            {
                IQueryParserManager nativeQueryParserManager = (IQueryParserManager) new QueryParserManagerCoClass();
                IQueryParser        queryParser   = null;
                IQuerySolution      querySolution = null;
                ICondition          result        = null;

                IEntity mainType = null;

                try
                {
                    // First, try to create a new IQueryParser using IQueryParserManager
                    Guid    guid = new Guid(ShellIIDGuid.IQueryParser);
                    HRESULT hr   = nativeQueryParserManager.CreateLoadedParser(
                        "SystemIndex",
                        cultureInfo == null ? (ushort)0 : (ushort)cultureInfo.LCID,
                        ref guid,
                        out queryParser);

                    if (!CoreErrorHelper.Succeeded((int)hr))
                    {
                        throw Marshal.GetExceptionForHR((int)hr);
                    }

                    if (queryParser != null)
                    {
                        // If user specified natural query, set the option on the query parser
                        PropVariant optionValue = new PropVariant();
                        optionValue.SetBool(true);
                        hr = queryParser.SetOption(StructuredQuerySingleOption.NaturalSyntax, ref optionValue);

                        if (!CoreErrorHelper.Succeeded((int)hr))
                        {
                            throw Marshal.GetExceptionForHR((int)hr);
                        }

                        // Next, try to parse the query.
                        // Result would be IQuerySolution that we can use for getting the ICondition and other
                        // details about the parsed query.
                        hr = queryParser.Parse(query, null, out querySolution);

                        if (!CoreErrorHelper.Succeeded((int)hr))
                        {
                            throw Marshal.GetExceptionForHR((int)hr);
                        }

                        if (querySolution != null)
                        {
                            // Lastly, try to get the ICondition from this parsed query
                            hr = querySolution.GetQuery(out result, out mainType);

                            if (!CoreErrorHelper.Succeeded((int)hr))
                            {
                                throw Marshal.GetExceptionForHR((int)hr);
                            }
                        }
                    }

                    return(new SearchCondition(result));
                }
                finally
                {
                    if (nativeQueryParserManager != null)
                    {
                        Marshal.ReleaseComObject(nativeQueryParserManager);
                    }

                    if (queryParser != null)
                    {
                        Marshal.ReleaseComObject(queryParser);
                    }

                    if (querySolution != null)
                    {
                        Marshal.ReleaseComObject(querySolution);
                    }

                    if (mainType != null)
                    {
                        Marshal.ReleaseComObject(mainType);
                    }
                }
            }
        }
Exemplo n.º 28
0
        public static void AssertQueries(IEnumerable <KeyValuePair <string, Type> > cases, IQueryParser parser)
        {
            void AssertThrowsException(Type t, Action action, string msg)
            {
                Func <Action, string, Exception> assert = Assert.ThrowsException <Exception>;
                var generic = assert.Method.GetGenericMethodDefinition().MakeGenericMethod(new[] { t });

                generic.Invoke(null, new object[] { action, msg });
            }

            foreach (var item in cases)
            {
                AssertThrowsException(item.Value, () => parser.Parse(item.Key),
                                      $"\"{item.Key}\" was expected to throw a {item.Value.Name}.");
            }
        }
Exemplo n.º 29
0
 public static void AssertQueries(IEnumerable <KeyValuePair <string, IList <QueryToken> > > cases, IQueryParser parser)
 {
     foreach (var item in cases)
     {
         try
         {
             AssertTokens(item.Value, parser.Parse(item.Key));
         }
         catch (AssertFailedException e)
         {
             throw new AssertFailedException($"Failed for query: \"{item.Key}\"\n{e.Message}", e);
         }
     }
 }
 public QueryStatementParser(IQueryParser queryParser, IHashProvider hashProvider)
 {
     _queryParser  = queryParser;
     _hashProvider = hashProvider;
 }
		/// <summary>
		/// Builds and executes the query.
		/// </summary>
		/// <param name="context">The request context.</param>
		/// <param name="arguments">The arguments from which to build the query.</param>
		/// <param name="repository">The <see cref="IRepository"/>.</param>
		/// <param name="parser">The <see cref="IQueryParser"/>.</param>
		/// <returns>Returns the result.</returns>
		protected abstract Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser);
Exemplo n.º 32
0
 public CreateIndexController(ILuceneHelper ILuceneHelper, IQueryParser IQueryParser)
 {
     this._ILuceneHelper = ILuceneHelper;
     this._IQueryParser  = IQueryParser;
 }
Exemplo n.º 33
0
 public void SetUp ()
 {
   _parserStub = MockRepository.GenerateStub<IQueryParser> ();
   _executorStub = MockRepository.GenerateStub<IQueryExecutor> ();
 }
Exemplo n.º 34
0
 public QuerySession(IDocumentStore store, IDocumentSchema schema, ISerializer serializer, IManagedConnection connection, IQueryParser parser, IIdentityMap identityMap, CharArrayTextWriter.Pool writerPool)
 {
     DocumentStore = store;
     _schema       = schema;
     _serializer   = serializer;
     _connection   = connection;
     _parser       = parser;
     _identityMap  = identityMap;
     WriterPool    = writerPool;
 }
Exemplo n.º 35
0
		/// <summary>
		/// Builds and executes the query.
		/// </summary>
		/// <param name="context">The request context.</param>
		/// <param name="arguments">The arguments from which to build the query.</param>
		/// <param name="repository">The <see cref="IRepository"/>.</param>
		/// <param name="parser">The <see cref="IQueryParser"/>.</param>
		/// <returns>Returns the result.</returns>
		protected override Record Retrieve(IMansionContext context, IPropertyBag arguments, IRepository repository, IQueryParser parser)
		{
			return GetAttribute<Node>(context, "source");
		}
Exemplo n.º 36
0
 public Index(IQueryParser queryParser, IQueryExecutor executor)
     : base(new DefaultQueryProvider(typeof(Index <>), queryParser, executor))
 {
 }
Exemplo n.º 37
0
        public MainForm()
        {
            InitializeComponent();
            ProcessCommandLine();

            staticHttpClient = new StaticHttpClient(Settings.Network);

            pathFormatter = new PathFormatter(Program.ApplicationPath, Program.SourcePath, Settings.PathFormatter.Custom, Settings.PathFormatter, Settings.Lists.Tags.LanguageNames, Settings.PathFormatter.IsEnabled);

            tagsModel         = new TagsModel();
            tokenModifiers    = TokenModifiers.All.Concat(new ITokenModifier[] { new TagTokenModifier(tagsModel) }).ToArray();
            bookmarkFormatter = new BookmarkFormatter(Settings.Lists.Bookmarks, Settings.Lists.Tags, tagsModel, pathFormatter, tokenModifiers);
            bookmarksModel    = new BookmarksModel(tagsModel, bookmarkFormatter);
            libraryModel      = new LibraryModel(pathFormatter.GetCacheDirectory(), new WinformsTimer(0, Settings.Polling.LibraryRefreshInterval));
            browsingModel     = new BrowsingModel();
            galleryModel      = new GalleryModel(tagsModel);
            detailsModel      = new DetailsModel();

            metadataKeywordLists = new MetadataKeywordLists();
            metadataProcessors   = new List <IMetadataProcessor>();
            metadataConverters   = new List <IMetadataConverter>();
            archiveWriters       = new List <IArchiveWriter>();
            queryParser          = new QueryParser(tagsModel);

            coreTextFormatter     = new CoreTextFormatter(pathFormatter, tokenModifiers);
            aboutTextFormatter    = new AboutTextFormatter(pathFormatter);
            tagTextFormatter      = new TagTextFormatter();
            metadataTextFormatter = new MetadataTextFormatter(pathFormatter, Settings.Lists.Tags.LanguageNames, metadataKeywordLists, tokenModifiers);

            documentTemplates                      = new DocumentTemplates();
            documentTemplates.About                = new DocumentTemplate <object>("about", Settings.Cache.Templates, pathFormatter, (x, context) => aboutTextFormatter.Format(x));
            documentTemplates.Details              = new DocumentTemplate <Metadata>("details", Settings.Cache.Templates, pathFormatter, (text, context) => metadataTextFormatter.Format(text, context));
            documentTemplates.DetailsPreload       = new DocumentTemplate <Metadata>("details-preload", Settings.Cache.Templates, pathFormatter, (text, context) => metadataTextFormatter.Format(text, context));
            documentTemplates.Download             = new DocumentTemplate <Metadata>("download", Settings.Cache.Templates, pathFormatter, (text, context) => metadataTextFormatter.Format(text, context));
            documentTemplates.GalleryTooltip       = new DocumentTemplate <Metadata>("gallery-tooltip", Settings.Cache.Templates, pathFormatter, (text, context) => metadataTextFormatter.Format(text, context));
            documentTemplates.LibraryCovergrid     = new DocumentTemplate <ISearchProgressArg>("library-covergrid", Settings.Cache.Templates, pathFormatter, (text, context) => searchProgressArgTextFormatter.Format(text, context, "library"));
            documentTemplates.LibraryCovergridItem = new DocumentTemplate <Metadata>("library-covergrid-item", Settings.Cache.Templates, pathFormatter, (text, context) => metadataTextFormatter.Format(text, context));
            documentTemplates.SearchCovergrid      = new DocumentTemplate <ISearchProgressArg>("search-covergrid", Settings.Cache.Templates, pathFormatter, (text, context) => searchProgressArgTextFormatter.Format(text, context, "search"));
            documentTemplates.SearchCovergridItem  = new DocumentTemplate <Metadata>("search-covergrid-item", Settings.Cache.Templates, pathFormatter, (text, context) => metadataTextFormatter.Format(text, context));
            documentTemplates.SearchPreload        = new DocumentTemplate <ISearchArg>("search-preload", Settings.Cache.Templates, pathFormatter, (text, context) => searchArgTextFormatter.Format(text, context));
            documentTemplates.Startup              = new DocumentTemplate <object>("startup", Settings.Cache.Templates, pathFormatter, (text, context) => coreTextFormatter.Format(text, context));

            searchArgTextFormatter         = new SearchArgTextFormatter(pathFormatter, metadataKeywordLists, tagsModel, tokenModifiers);
            searchProgressArgTextFormatter = new SearchProgressArgTextFormatter(pathFormatter, metadataKeywordLists, tagsModel, metadataTextFormatter, tokenModifiers, documentTemplates.SearchCovergridItem, documentTemplates.LibraryCovergridItem);

            metadataCache     = new MetadataCache();
            searchResultCache = new SearchResultCache(metadataCache);
            sessionManager    = new SessionManager(pathFormatter, searchResultCache, Settings.Cache.Session.RecentLifeSpan, Settings.Cache.Session.SearchLifeSpan, Settings.Cache.Session.TaggedLifeSpan, Settings.Network);
            cacheFileSystem   = new CacheFileSystem(pathFormatter, searchResultCache, archiveWriters);
            pluginSystem      = new PluginSystem(Logger, pathFormatter, cacheFileSystem, archiveWriters, metadataConverters, metadataProcessors);

            backgroundTaskWorker = new BackgroundTaskWorker()
            {
                IdleWaitTime = Settings.BackgroundWorkers.BackgroundTaskWorker.IdleWaitTime, MaxConcurrentJobCount = Settings.BackgroundWorkers.BackgroundTaskWorker.MaxConcurrentJobCount
            };
            pageDownloader = new PageDownloader(staticHttpClient.Client, pathFormatter, searchResultCache, cacheFileSystem)
            {
                IdleWaitTime = Settings.BackgroundWorkers.PageDownloader.IdleWaitTime, MaxConcurrentJobCount = Settings.BackgroundWorkers.PageDownloader.MaxConcurrentJobCount
            };
            coverDownloader = new CoverDownloader(staticHttpClient.Client, pathFormatter, metadataKeywordLists)
            {
                IdleWaitTime = Settings.BackgroundWorkers.CoverDownloader.IdleWaitTime, MaxConcurrentJobCount = Settings.BackgroundWorkers.CoverDownloader.MaxConcurrentJobCount
            };
            coverLoader = new CoverDownloader(staticHttpClient.Client, pathFormatter, metadataKeywordLists)
            {
                IdleWaitTime = Settings.BackgroundWorkers.CoverLoader.IdleWaitTime, MaxConcurrentJobCount = Settings.BackgroundWorkers.CoverLoader.MaxConcurrentJobCount
            };
            galleryDownloader = new GalleryDownloader(staticHttpClient.Client, pathFormatter, searchResultCache)
            {
                IdleWaitTime = Settings.BackgroundWorkers.GalleryDownloader.IdleWaitTime, MaxConcurrentJobCount = Settings.BackgroundWorkers.GalleryDownloader.MaxConcurrentJobCount
            };

            detailsTabControl         = new TabControlEx();
            detailsTabPage            = new TabPage();
            downloadTabPage           = new TabPage();
            listsTabControl           = new TabControlEx();
            tagsTabPage               = new TabPage();
            bookmarksTabPage          = new TabPage();
            libraryTabPage            = new TabPage();
            browsingTabPage           = new TabPage();
            mainViewTabControl        = new TabControlEx();
            galleryBrowserViewTabPage = new TabPage();
            libraryBrowserViewTabPage = new TabPage();
            downloadsListViewTabPage  = new TabPage();
            webBrowserToolTip         = new WebBrowserTreeNodeToolTip(pathFormatter, documentTemplates.GalleryTooltip);
            loadTimer = new Timer(components);

            searchHandler = new SearchHandler(
                libraryModel
                , mainViewTabControl
                , libraryBrowserViewTabPage
                , galleryBrowserViewTabPage
                , Settings.Cache
                , searchResultCache
                , Logger
                , browsingModel
                , pathFormatter
                , staticHttpClient.Client
                , queryParser
                , galleryModel
                , detailsModel
                , galleryDownloader
                , sessionManager
                , Settings.Network);

            bookmarkPromptUtility = new BookmarkPromptUtility(bookmarksModel, Settings.Lists.Bookmarks);

            tagsFilter           = new TagsFilter(Settings.Lists.Tags, metadataKeywordLists);
            bookmarksFilter      = new BookmarksFilter(Settings.Lists.Bookmarks);
            libraryFilter        = new LibraryFilter(Settings.Lists.Library);
            browsingFilter       = new BrowsingFilter(Settings.Lists.Browsing);
            libraryBrowserFilter = new LibraryBrowserFilter(Settings.Library.Browser);
            galleryBrowserFilter = new GalleryBrowserFilter(Settings.Gallery.Browser);
            detailsBrowserFilter = new DetailsBrowserFilter(Settings.Details.Browser);

            tagsTreeView       = new TagsTreeView(tagsFilter, tagsModel, tagTextFormatter, Settings.Lists.Tags, metadataKeywordLists, searchHandler, bookmarkPromptUtility, staticHttpClient.Client);
            tagsToolStrip      = new TagsToolStrip(tagsFilter, tagsModel, Settings.Lists.Tags, metadataKeywordLists, Settings.Polling.FilterDelay);
            bookmarksTreeView  = new BookmarksTreeView(bookmarksFilter, bookmarksModel, Settings.Lists.Bookmarks, webBrowserToolTip, queryParser, cacheFileSystem, searchHandler);
            bookmarksToolStrip = new BookmarksToolStrip(bookmarksFilter, bookmarksModel, Settings.Lists.Bookmarks, Settings.Polling.FilterDelay);
            libraryTreeView    = new LibraryTreeView(libraryFilter, libraryModel, archiveWriters, webBrowserToolTip, searchHandler, cacheFileSystem);
            libraryToolStrip   = new LibraryToolStrip(libraryFilter, libraryModel, Settings.Lists.Library, Settings.Polling.FilterDelay);
            browsingTreeView   = new BrowsingTreeView(browsingFilter, browsingModel, Settings.Lists.Browsing, searchHandler, sessionManager, queryParser);
            browsingToolStrip  = new BrowsingToolStrip(browsingFilter, browsingModel, Settings.Lists.Browsing, Settings.Polling.FilterDelay);

            galleryBrowserView      = new GalleryBrowserView(galleryBrowserFilter, galleryModel, documentTemplates.SearchCovergrid, documentTemplates.SearchPreload, pathFormatter, Settings.Gallery.Browser, pageDownloader, coverDownloader, metadataKeywordLists, tagsModel, searchHandler);
            galleryToolStrip        = new GalleryBrowserToolStrip(galleryBrowserFilter, galleryModel, Settings.Gallery.Browser, searchHandler);
            libraryBrowserView      = new LibraryBrowserView(libraryBrowserFilter, libraryModel, documentTemplates.LibraryCovergrid, documentTemplates.SearchPreload, documentTemplates.LibraryCovergridItem, pathFormatter, pageDownloader, coverLoader, metadataKeywordLists, Settings.Library.Browser, searchResultCache);
            libraryBrowserToolStrip = new LibraryBrowserToolStrip(libraryBrowserFilter, libraryModel, Settings.Library.Browser, searchHandler);
            detailsToolStrip        = new DetailsBrowserToolStrip(detailsBrowserFilter, detailsModel, searchHandler);
            detailsBrowserView      = new DetailsBrowserView(detailsBrowserFilter, detailsModel, documentTemplates.Details, documentTemplates.Download, documentTemplates.DetailsPreload, galleryDownloader, pageDownloader, coverDownloader, metadataKeywordLists, Settings.Details.Browser, searchResultCache, cacheFileSystem);
            theme                  = new Theme();
            applicationLoader      = new ApplicationLoader();
            fullScreenRestoreState = new FullScreenRestoreState();
            mainMenuStrip          = new MainMenuStrip(Settings);
            startupSpecialHandler  = new StartupSpecialHandler(Settings.Gallery, tagsModel, metadataKeywordLists, searchHandler);
            taskbar                = new Taskbar(coverDownloader, galleryDownloader, pageDownloader, searchResultCache, cacheFileSystem);

            publicApi = new PublicApi(staticHttpClient.Client
                                      , pathFormatter
                                      , cacheFileSystem
                                      , searchResultCache
                                      , searchHandler
                                      , bookmarkPromptUtility
                                      , pluginSystem
                                      , libraryBrowserToolStrip
                                      , Settings.Library
                                      , galleryToolStrip
                                      , Settings.Gallery
                                      , Settings.Details
                                      , galleryDownloader
                                      , coverDownloader
                                      , pageDownloader
                                      , Settings.Notifications
                                      , metadataKeywordLists
                                      , Settings
                                      );

            splitContainer1 = new SplitContainerEx();
            splitContainer2 = new SplitContainerEx();
            splitContainer3 = new SplitContainerEx();

            splitContainer1.BeginInit();
            splitContainer1.Panel2.SuspendLayout();
            splitContainer1.SuspendLayout();

            splitContainer2.BeginInit();
            splitContainer2.Panel1.SuspendLayout();
            splitContainer2.SuspendLayout();

            splitContainer3.BeginInit();
            splitContainer3.SuspendLayout();

            SuspendLayout();

            //
            //
            //
            loadTimer.Interval = 100;
            loadTimer.Tick    += LoadTimer_Tick;

            //
            //
            //
            tagsTabPage.Name     = "tagsTabPage";
            tagsTabPage.TabIndex = 0;
            tagsTabPage.Tag      = "tags";
            tagsTabPage.Text     = "Tags";
            tagsTabPage.UseVisualStyleBackColor = true;

            bookmarksTabPage.Name     = "bookmarksTabPage";
            bookmarksTabPage.TabIndex = 1;
            bookmarksTabPage.Tag      = "bookmarks";
            bookmarksTabPage.Text     = "Bookmarks";
            bookmarksTabPage.UseVisualStyleBackColor = true;

            libraryTabPage.Name     = "libraryTabPage";
            libraryTabPage.TabIndex = 2;
            libraryTabPage.Tag      = "library";
            libraryTabPage.Text     = "Library";
            libraryTabPage.UseVisualStyleBackColor = true;

            browsingTabPage.Name     = "browsingTabPage";
            browsingTabPage.TabIndex = 4;
            browsingTabPage.Tag      = "browsing";
            browsingTabPage.Text     = "Browsing";
            browsingTabPage.UseVisualStyleBackColor = true;

            //
            //
            //
            listsTabControl.Dock          = DockStyle.Fill;
            listsTabControl.Name          = "treeViewTabControl";
            listsTabControl.SelectedIndex = -1;
            listsTabControl.TabIndex      = 2;
            listsTabControl.TabPages.Add(tagsTabPage);
            listsTabControl.TabPages.Add(bookmarksTabPage);
            listsTabControl.TabPages.Add(libraryTabPage);
            listsTabControl.TabPages.Add(browsingTabPage);
            listsTabControl.Selected += TreeViewTabControl_Selected;

            splitContainer3.Panel1.Controls.Add(listsTabControl);

            //
            //
            //
            tagsTreeView.Dock = DockStyle.Fill;

            //
            //
            //
            tagsToolStrip.Dock         = DockStyle.Top;
            tagsToolStrip.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            tagsToolStrip.AutoSize     = true;

            //
            //
            //
            tagsTabPage.Controls.Add(tagsTreeView);
            tagsTabPage.Controls.Add(tagsToolStrip);

            //
            //
            //
            bookmarksModel.ItemAdded   += BookmarksModel_ItemAdded;
            bookmarksModel.ItemChanged += BookmarksModel_ItemChanged;

            //
            //
            //
            bookmarksTreeView.Dock = DockStyle.Fill;

            //
            //
            //
            bookmarksToolStrip.Dock         = DockStyle.Top;
            bookmarksToolStrip.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            bookmarksToolStrip.AutoSize     = true;

            //
            //
            //
            bookmarksTabPage.Controls.Add(bookmarksTreeView);
            bookmarksTabPage.Controls.Add(bookmarksToolStrip);

            //
            //
            //
            libraryTreeView.Dock = DockStyle.Fill;

            //
            //
            //
            libraryToolStrip.Dock         = DockStyle.Top;
            libraryToolStrip.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            libraryToolStrip.AutoSize     = true;

            //
            //
            //
            libraryTabPage.Controls.Add(libraryTreeView);
            libraryTabPage.Controls.Add(libraryToolStrip);

            //
            //
            //
            browsingModel.ItemAdded   += BrowsingModel_ItemAdded;
            browsingModel.ItemChanged += BrowsingModel_ItemChanged;

            //
            //
            //
            browsingToolStrip.Dock         = DockStyle.Top;
            browsingToolStrip.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            browsingToolStrip.AutoSize     = true;

            //
            //
            //
            browsingTreeView.Dock = DockStyle.Fill;

            //
            //
            //
            browsingTabPage.Controls.Add(browsingTreeView);
            browsingTabPage.Controls.Add(browsingToolStrip);

            //
            //
            //
            galleryBrowserViewTabPage.Name     = "galleryBrowserViewTabPage";
            galleryBrowserViewTabPage.Padding  = Padding.Empty;
            galleryBrowserViewTabPage.TabIndex = 0;
            galleryBrowserViewTabPage.Text     = "Search";
            galleryBrowserViewTabPage.UseVisualStyleBackColor = true;

            //
            //
            //
            libraryBrowserViewTabPage.Name     = "libraryBrowserViewTabPage";
            libraryBrowserViewTabPage.TabIndex = 1;
            libraryBrowserViewTabPage.Text     = "Library";
            libraryBrowserViewTabPage.UseVisualStyleBackColor = true;

            //
            //
            //
            downloadsListViewTabPage.Name     = "downloadsListViewTabPage";
            downloadsListViewTabPage.TabIndex = 2;
            downloadsListViewTabPage.Text     = "Downloads";
            downloadsListViewTabPage.UseVisualStyleBackColor = true;

            //
            //
            //
            mainViewTabControl.Controls.Add(galleryBrowserViewTabPage);
            mainViewTabControl.Controls.Add(libraryBrowserViewTabPage);
            mainViewTabControl.Controls.Add(downloadsListViewTabPage);
            mainViewTabControl.Dock          = DockStyle.Fill;
            mainViewTabControl.Name          = "mainViewTabControl";
            mainViewTabControl.SelectedIndex = 0;
            mainViewTabControl.TabIndex      = 2;
            mainViewTabControl.Selected     += MainViewTabControl_Selected;

            splitContainer3.Panel2.Controls.Add(mainViewTabControl);
            splitContainer2.Panel2.Controls.Add(detailsTabControl);

            //
            // detailsTabControl
            //
            detailsTabControl.Controls.Add(detailsTabPage);
            detailsTabControl.Controls.Add(downloadTabPage);
            detailsTabControl.Dock          = DockStyle.Fill;
            detailsTabControl.Name          = "detailsTabControl";
            detailsTabControl.SelectedIndex = 0;
            detailsTabControl.TabIndex      = 2;

            //
            // detailsTabPage
            //
            detailsTabPage.Name     = "detailsTabPage";
            detailsTabPage.TabIndex = 0;
            detailsTabPage.Text     = "Details";
            detailsTabPage.UseVisualStyleBackColor = true;

            //
            // downloadTabPage
            //
            downloadTabPage.Name     = "downloadTabPage";
            downloadTabPage.TabIndex = 1;
            downloadTabPage.Text     = "Download";
            downloadTabPage.UseVisualStyleBackColor = true;

            //
            //
            //
            galleryBrowserView.Dock = DockStyle.Fill;
            galleryBrowserView.WebBrowser.ObjectForScripting = publicApi;

            //
            //
            //
            galleryToolStrip.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            galleryToolStrip.AutoSize     = true;
            galleryToolStrip.Dock         = DockStyle.Top;

            //
            //
            //
            galleryBrowserViewTabPage.Controls.Add(galleryBrowserView);
            galleryBrowserViewTabPage.Controls.Add(galleryToolStrip);

            //
            //
            //
            libraryBrowserView.Dock = DockStyle.Fill;
            libraryBrowserView.WebBrowser.ObjectForScripting = publicApi;

            //
            //
            //
            libraryBrowserToolStrip.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            libraryBrowserToolStrip.AutoSize     = true;
            libraryBrowserToolStrip.Dock         = DockStyle.Top;

            //
            //
            //
            libraryBrowserViewTabPage.Controls.Add(libraryBrowserView);
            libraryBrowserViewTabPage.Controls.Add(libraryBrowserToolStrip);

            //
            //
            //
            detailsToolStrip.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            detailsToolStrip.AutoSize     = true;
            detailsToolStrip.Dock         = DockStyle.Top;

            //
            //
            //
            detailsBrowserView.Dock = DockStyle.Fill;
            detailsBrowserView.WebBrowser.ObjectForScripting = publicApi;

            //
            //
            //
            detailsTabPage.Controls.Add(detailsBrowserView);
            detailsTabPage.Controls.Add(detailsToolStrip);

            //
            // splitContainer1
            //
            splitContainer1.Dock          = DockStyle.Fill;
            splitContainer1.FixedPanel    = FixedPanel.Panel1;
            splitContainer1.Margin        = new Padding(0);
            splitContainer1.Name          = "splitContainer1";
            splitContainer1.Orientation   = Orientation.Horizontal;
            splitContainer1.Panel1MinSize = 22;

            //
            // splitContainer1.Panel2
            //
            splitContainer1.Panel2.Controls.Add(splitContainer2);
            splitContainer1.Size              = new Size(1364, 637);
            splitContainer1.SplitterDistance  = 25;
            splitContainer1.SplitterIncrement = 22;
            splitContainer1.SplitterWidth     = 7;
            splitContainer1.TabIndex          = 2;

            //
            // splitContainer2
            //
            splitContainer2.Dock       = DockStyle.Fill;
            splitContainer2.FixedPanel = FixedPanel.Panel2;
            splitContainer2.Margin     = new Padding(0);
            splitContainer2.Name       = "splitContainer2";

            //
            // splitContainer2.Panel1
            //
            splitContainer2.Panel1.Controls.Add(splitContainer3);
            splitContainer2.Size             = new Size(1364, 605);
            splitContainer2.SplitterDistance = 1214;
            splitContainer2.SplitterWidth    = 7;
            splitContainer2.TabIndex         = 1;

            //
            // splitContainer3
            //
            splitContainer3.Dock             = DockStyle.Fill;
            splitContainer3.FixedPanel       = FixedPanel.Panel1;
            splitContainer3.Margin           = new Padding(0);
            splitContainer3.Name             = "splitContainer3";
            splitContainer3.Size             = new Size(1214, 605);
            splitContainer3.SplitterDistance = 200;
            splitContainer3.SplitterWidth    = 7;
            splitContainer3.TabIndex         = 0;

            //
            // applicationMenuStrip
            //
            mainMenuStrip.Exit               += MainMenuStrip_Exit;
            mainMenuStrip.ToggleListsPanel   += MainMenuStrip_ToggleListsPanel;
            mainMenuStrip.ToggleDetailsPanel += MainMenuStrip_ToggleDetailsPanel;
            mainMenuStrip.ToggleFullScreen   += MainMenuStrip_ToggleFullScreen;
            mainMenuStrip.ShowAbout          += MainMenuStrip_ShowAbout;
            mainMenuStrip.ShowPlugins        += MainMenuStrip_ShowPlugins;

            //
            // this
            //
            Controls.Add(splitContainer1);
            Controls.Add(mainMenuStrip);
            Controls.Add(webBrowserToolTip);
            webBrowserToolTip.BringToFront();
            MainMenuStrip = mainMenuStrip;
            Padding       = new Padding(0);
            Text          = aboutTextFormatter.Format(Settings.Window.TextFormat);
            if (Settings.Network.Offline)
            {
                Text += " [OFFLINE]";
            }
            Enabled = false;

            //
            // splash screen
            //
            if (Settings.SplashScreen.IsVisible)
            {
                startupWebBrowser      = new StartupWebBrowserView(coreTextFormatter, documentTemplates.Startup, applicationLoader);
                startupWebBrowser.Name = "startupWebBrowserView";
                startupWebBrowser.Dock = DockStyle.Fill;
                startupWebBrowser.WebBrowser.DocumentCompleted += WebBrowser_DocumentCompleted;

                Controls.Add(startupWebBrowser);
                startupWebBrowser.BringToFront();

                // avoid flickering
                listsTabControl.Visible    = false;
                mainViewTabControl.Visible = false;
                detailsTabControl.Visible  = false;
            }

            backgroundTaskWorker.ProgressChanged += TaskBackgroundWorker_ProgressChanged;

            pageDownloader.PagesDownloadCompleted += PageDownloader_PagesDownloadCompleted;

            ReadTheme();
            ApplyTheme();
            ApplyVisualStyles();

            splitContainer1.Panel2.ResumeLayout(false);
            splitContainer1.EndInit();
            splitContainer1.ResumeLayout(false);

            splitContainer2.Panel1.ResumeLayout(false);
            splitContainer2.EndInit();
            splitContainer2.ResumeLayout(false);

            splitContainer3.EndInit();
            splitContainer3.ResumeLayout(false);

            ResumeLayout(false);
            PerformLayout();
        }
Exemplo n.º 38
0
 public TermFieldQueryBuilder(IQueryParser parser, string field, JsonSchemaExtendedType type)
     : base(parser, field, type)
 {
 }
Exemplo n.º 39
0
 public SampleQueryable(IQueryParser queryParser, IQueryExecutor queryExecutor)
     : base(new DefaultQueryProvider(typeof(SampleQueryable <>), queryParser, queryExecutor))
 {
 }
Exemplo n.º 40
0
 public NullQueryable(IQueryParser queryParser, IQueryExecutor executor) : base(queryParser, executor)
 {
 }
Exemplo n.º 41
0
 /// <summary>
 /// Constructor for testing, allows dependencies to be injected.
 /// </summary>
 public SceneQuery(ISceneTraversal sceneTraversal, IQueryParser queryParser)
 {
     this.sceneTraversal = sceneTraversal;
     this.queryParser    = queryParser;
 }
Exemplo n.º 42
0
 protected ReadOnlyWebController(IReadOnlyAppController <TEntity, TKey> appController, IQueryParser <TEntity> queryParser)
     : base(appController, queryParser)
 {
 }
 /// <summary>
 /// </summary>
 /// <param name="parser"></param>
 public RetrieveSiteNodeTag(IQueryParser parser)
     : base(parser)
 {
 }
Exemplo n.º 44
0
 public AsyncQueryProvider(Type queryableType, [NotNull] IQueryParser queryParser, [NotNull] IAsyncQueryExecutor executor) : base(queryableType, queryParser, executor)
 {
 }
Exemplo n.º 45
0
 public DataSource(IQueryParser queryParser, IQueryExecutor executor)
     : base(new DefaultQueryProvider(typeof(DataSource <>), queryParser, executor))
 {
 }
 /// <summary>
 /// </summary>
 /// <param name="parser"></param>
 public RetrieveBlockNodesetTag(IQueryParser parser)
     : base(parser)
 {
 }
 public CatsController(IReadOnlyAppController <Cat, int> appController, IQueryParser <DTOCat> queryParser, IRddObjectsMapper <DTOCat, Cat> mapper)
     : base(appController, queryParser, mapper)
 {
 }
Exemplo n.º 48
0
 public Starter(IQueryParser queryParser, IModelsStarter _modelsStarter)
 {
     this.queryParser = queryParser;
     this._modelsStarter = _modelsStarter;
 }
Exemplo n.º 49
0
		/// <summary>
		/// </summary>
		/// <param name="parser"></param>
		public RetrieveRecordTag(IQueryParser parser) : base(parser)
		{
		}
		/// <summary>
		/// </summary>
		/// <param name="parser"></param>
		public RetrieveChildNodeTag(IQueryParser parser) : base(parser)
		{
		}
Exemplo n.º 51
0
 public UserWebController(IReadOnlyAppController <IUser, int> appController, IQueryParser <IUser> queryParser)
     : base(appController, queryParser)
 {
 }
Exemplo n.º 52
0
 public FSQueryable(IQueryParser parser, IQueryExecutor executor) : base(parser, executor)
 {
 }
Exemplo n.º 53
0
        public DocumentSession(IDocumentStore store, StoreOptions options, IDocumentSchema schema,
                               ISerializer serializer, IManagedConnection connection, IQueryParser parser, IIdentityMap identityMap, CharArrayTextWriter.Pool writerPool)
            : base(store, schema, serializer, connection, parser, identityMap, writerPool)
        {
            _options    = options;
            _schema     = schema;
            _serializer = serializer;
            _connection = connection;

            IdentityMap = identityMap;


            _unitOfWork = new UnitOfWork(_schema);

            if (IdentityMap is IDocumentTracker)
            {
                _unitOfWork.AddTracker(IdentityMap.As <IDocumentTracker>());
            }

            Events = new EventStore(this, schema, _serializer, _connection, _unitOfWork);
        }
Exemplo n.º 54
0
		/// <summary>
		/// </summary>
		/// <param name="parser"></param>
		public FetchNodeTag(IQueryParser parser) : base(parser)
		{
		}
Exemplo n.º 55
0
 public MathService(IQueryParser queryParser)
 {
     _queryParser = queryParser;
 }
Exemplo n.º 56
0
 public WssQuery(IQueryParser queryParser, IQueryExecutor executor) : base(queryParser, executor)
 {
 }
 protected IQueryParser GetEngine(IDbCommand actual)
 {
     if (engine == null)
         engine = new QueryEngineFactory().GetParser(actual);
     return engine;
 }
Exemplo n.º 58
0
 public MySqlQueryable(IQueryParser queryParser, IQueryExecutor executor)
     : base(new DefaultQueryProvider(typeof(MySqlQueryable <>), queryParser, executor))
 {
 }
		/// <summary>
		/// </summary>
		/// <param name="parser"></param>
		public RetrieveParentNodesetTag(IQueryParser parser) : base(parser)
		{
		}
Exemplo n.º 60
0
 //TODO: Select Builder implementation pattern instead.
 public override IFieldQueryBuilder PrepareBuilder(IQueryParser parser, string fieldName, JsonSchemaExtendedType type)
 {
     return(new TermFieldQueryBuilder(parser, fieldName, type));
 }