Example #1
0
        public static LibraryQuery ToLibraryQuery(JObject libraryQueryJson)
        {
            var libraryQuery = new LibraryQuery(libraryQueryJson.Value <string>("searchString"));

            if (libraryQueryJson.ContainsKey("excludeAnnotations"))
            {
                libraryQuery.ExcludeAnnotations = libraryQueryJson.Value <bool>("excludeAnnotations");
            }

            if (libraryQueryJson.ContainsKey("excludeDocumentText"))
            {
                libraryQuery.ExcludeDocumentText = libraryQueryJson.Value <bool>("excludeDocumentText");
            }

            if (libraryQueryJson.ContainsKey("matchExactPhrases"))
            {
                libraryQuery.MatchExactPhrases = libraryQueryJson.Value <bool>("matchExactPhrases");
            }

            if (libraryQueryJson.ContainsKey("maximumSearchResultsPerDocument"))
            {
                libraryQuery.MaximumSearchResultsPerDocument = libraryQueryJson.Value <int>("maximumSearchResultsPerDocument");
            }

            if (libraryQueryJson.ContainsKey("maximumSearchResultsTotal"))
            {
                libraryQuery.MaximumSearchResultsTotal = libraryQueryJson.Value <int>("maximumSearchResultsTotal");
            }


            if (libraryQueryJson.ContainsKey("maximumPreviewResultsPerDocument"))
            {
                libraryQuery.MaximumPreviewResultsPerDocument = libraryQueryJson.Value <int>("maximumPreviewResultsPerDocument");
            }

            if (libraryQueryJson.ContainsKey("maximumPreviewResultsTotal"))
            {
                libraryQuery.MaximumPreviewResultsTotal = libraryQueryJson.Value <int>("maximumPreviewResultsTotal");
            }

            if (libraryQueryJson.ContainsKey("generateTextPreviews"))
            {
                libraryQuery.GenerateTextPreviews = libraryQueryJson.Value <bool>("generateTextPreviews");
            }

            if (libraryQueryJson.ContainsKey("generateTextPreviews"))
            {
                libraryQuery.GenerateTextPreviews = libraryQueryJson.Value <bool>("generateTextPreviews");
            }

            if (libraryQueryJson.ContainsKey("previewRange"))
            {
                libraryQuery.PreviewRange = ToRange(libraryQueryJson.GetValue("previewRange"));
            }

            return(libraryQuery);
        }
 public override void PushTabView(MobileNavigationTabType type, MobileLibraryBrowserType browserType, LibraryQuery query, IBaseView view)
 {
 }
 public override void NotifyMobileLibraryBrowserQueryChange(MobileNavigationTabType type, MobileLibraryBrowserType browserType,
     LibraryQuery query)
 {
 }
 public override void AddTab(MobileNavigationTabType type, string title, MobileLibraryBrowserType browserType, LibraryQuery query,
     IBaseView view)
 {
 }
 public override void NotifyMobileLibraryBrowserQueryChange(MobileNavigationTabType type, MobileLibraryBrowserType browserType,
     LibraryQuery query)
 {
     Debug.WriteLine("WindowsPhoneNavigationManager - NotifyMobileLibraryBrowserQueryChange");
 }
 public override void PushTabView(MobileNavigationTabType type, MobileLibraryBrowserType browserType, LibraryQuery query, IBaseView view)
 {
     Debug.WriteLine("WindowsPhoneNavigationManager - PushTabView");
 }
 public override void AddTab(MobileNavigationTabType type, string title, MobileLibraryBrowserType browserType, LibraryQuery query,
     IBaseView view)
 {
     Debug.WriteLine("WindowsPhoneNavigationManager - AddTab");
 }
Example #8
0
 public IEnumerable <AssetResult> GetAssets(LibraryQuery q) => _db.GetAssets(this, q);