コード例 #1
0
        public ActionResult Filters(ISearchResultModel model)
        {
            if (model == null)
            {
                return(Content(""));
            }

            #region Obsolete
            //// TODO: (mc) really necessary?
            //if (excludedFacets != null && excludedFacets.Length > 0)
            //{
            //	foreach (var exclude in excludedFacets.Where(x => x.HasValue()))
            //	{
            //		var facets = searchResultModel.SearchResult.Facets;
            //		if (facets.ContainsKey(exclude))
            //		{
            //			facets.Remove(exclude);
            //		}
            //	}
            //}
            #endregion

            ViewBag.TemplateProvider = _templateProvider.Value;

            return(PartialView(model));
        }
コード例 #2
0
        public ActionResult ActiveFilters(ISearchResultModel model)
        {
            if (model == null || (ControllerContext.ParentActionViewContext != null && ControllerContext.ParentActionViewContext.IsChildAction))
            {
                return(Content(""));
            }

            return(PartialView("Filters.Active", model));
        }
コード例 #3
0
 public HighlightingManager(
     ISearchResultModel searchResultModel,
     IPresentationDataAccess presentationDataAccess,
     IFiltersList highlightFilters
     )
 {
     this.searchResultModel      = searchResultModel;
     this.presentationDataAccess = presentationDataAccess;
     this.highlightFilters       = highlightFilters;
 }
コード例 #4
0
        public SearchResult AddChild(ISearchResultModel modelArgument)
        {
            SearchResult searchResult = new SearchResult(this.Level + 1, modelArgument, this);

            searchResult.SelectedChanged += this.ProcessSelectionChanged;
            searchResult.DoubleClick     += this.DoubleClick;

            this.ChildrenListView.Items.Add(searchResult);

            return(searchResult);
        }
コード例 #5
0
        public void BeforeEach()
        {
            searchResultModel = Substitute.For <ISearchResultModel>();
            highlightFilters  = Substitute.For <IFiltersList>();
            selectionManager  = Substitute.For <ISelectionManager>();
            messagesSource    = Substitute.For <IMessagesSource>();
            colorTheme        = Substitute.For <IColorTheme>();
            wordSelection     = new WordSelection(RegularExpressions.FCLRegexFactory.Instance);
            isRawMessagesMode = false;
            viewSize          = 3;
            highlightFilters.FilteringEnabled.Returns(true);
            colorTheme.HighlightingColors.Returns(ImmutableArray.CreateRange(Enumerable.Range(
                                                                                 (int)FilterAction.IncludeAndColorizeFirst, FilterAction.IncludeAndColorizeLast - FilterAction.IncludeAndColorizeFirst + 1)
                                                                             .Select(i => MakeHightlightingColor((FilterAction)i))
                                                                             ));
            msg1 = new Message(0, 1, null, new MessageTimestamp(), new StringSlice("test message 1"), SeverityFlag.Info);
            msg2 = new Message(0, 1, null, new MessageTimestamp(), new StringSlice("test message 2"), SeverityFlag.Info);
            msgWithMultilineText = new Message(0, 1, null, new MessageTimestamp(), new StringSlice(
                                                   @"2019/03/27 06:27:52.143 T#1 I app: model creation finished
import { imock, instance, when, anything, verify, resetCalls, MockPropertyPolicy, deepEqual } from 'ts-mockito';
import * as expect from 'expect';
import { Map, OrderedSet } from 'immutable';
import { ChangeNotification } from '../../../../client/model/utils';
import { PodStore, Pod } from '../../../../client/model/pod/store';
import { MeetingSession } from '../../../../client/model/meeting/impl/meeting/meetingSession';
import { Meeting, MeetingParticipant, LocalMeetingParticipant } from '../../../../client/model/meeting';
import { Conversation, ConversationStore, StreamId } from '../../../../client/model/conversation/store';
import { MeetingStartupOptions, Meeting as MeetingBase, MediaDevices, ParticipantTracks, ScreenTrack } from '../../../../client/model/meeting';
import { Protocol } from '../../../../client/model/meeting/protocol';
import { MeetingImpl } from '../../../../client/model/meeting/impl/meeting/impl/meetingImpl';
import { RtcManager, RtcManagerConfig } from '../../../../client/model/rtcManager';
import { MeetingAnalytics, LeaveSources } from '../../../../client/model/analytics';
import { MeetingParticipants } from '../../../../client/model/meeting/impl/meeting/meetingParticipants';
import { UncaughtExceptionsTrap } from '../../../utils/uncaughtExceptionsTrap';
import { AutoResetEvent, waiter } from '../../../utils/promise-utils';
import { MeetingLocalMedia } from '../../../../client/model/meeting/impl/media/meetingLocalMedia';
import { MeetingRemoteMedia } from '../../../../client/model/meeting/impl/media/meetingRemoteMedia';
import { LolexClock, install } from 'lolex';
import { RtcTokenProvider } from '../../../../client/model/meeting/impl/protocol/impl/rtcTokenProviderImpl';
import { User, UserStore, CurrentUser, UserId } from '../../../../client/model/users/store';
import { fireAndForget } from '../../../utils/promise-utils';
import { RtcSettingsStore, RtcSettings } from '../../../../client/model/settings/store';
import { GeoRouter } from '../../../../client/model/georouting/geoRouter';
import { UserBackend } from '../../../../client/model/users/backend';

describe('MeetingV2', () => {
    let meeting: Meeting;"
                                                   ), SeverityFlag.Info);
        }
コード例 #6
0
        private SearchResult(int level, ISearchResultModel model, SearchResult parent)
        {
            this.notificationChainManager.Observe(this);
            this.notificationChainManager.AddDefaultCall((sender, notifyingProperty, dependentProperty) => RaisePropertyChanged(dependentProperty));

            this.parent = parent;

            this.model = model;

            this.Level = level;

            this.InitializeComponent();

            this.DataContext = this;
        }
コード例 #7
0
        public HighlightingManager(
            ISearchResultModel searchResultModel,
            Func <MessageTextGetter> displayTextGetterSelector,
            Func <int> viewSizeSelector,
            IFiltersList highlightFilters,
            ISelectionManager selectionManager,
            IWordSelection wordSelection,
            IColorTheme theme,
            RegularExpressions.IRegexFactory regexFactory
            )
        {
            var viewSizeQuantizedSelector = Selectors.Create(
                viewSizeSelector,
                viewSize => (1 + (viewSize / 16)) * 16
                );

            this.getHighlightingHandler = Selectors.Create(
                () => (highlightFilters?.FilteringEnabled, highlightFilters?.Items, highlightFilters?.FiltersVersion),
                displayTextGetterSelector,
                viewSizeQuantizedSelector,
                () => theme.HighlightingColors,
                (filtersData, displayTextGetter, viewSize, hlColors) => filtersData.FilteringEnabled == true ?
                new CachingHighlightingHandler(msg => GetHlHighlightingRanges(msg, filtersData.Items, displayTextGetter, hlColors), ViewSizeToCacheSize(viewSize))
                                        : (IHighlightingHandler) new DummyHandler()
                );
            this.getSearchResultHandler = Selectors.Create(
                () => searchResultModel?.SearchFiltersList,
                displayTextGetterSelector,
                viewSizeQuantizedSelector,
                (filters, displayTextGetter, viewSize) => filters != null ?
                new CachingHighlightingHandler(msg => GetSearchResultsHighlightingRanges(msg, filters, displayTextGetter), ViewSizeToCacheSize(viewSize))
                                        : null
                );
            this.getSelectionHandler = Selectors.Create(
                () => selectionManager.Selection,
                displayTextGetterSelector,
                viewSizeQuantizedSelector,
                (selection, displayTextGetter, viewSize) =>
                MakeSelectionInplaceHighlightingHander(selection, displayTextGetter, wordSelection, ViewSizeToCacheSize(viewSize), regexFactory)
                );
        }
コード例 #8
0
        public SelectionManager(
            IView view,
            ISearchResultModel searchResultModel,             // todo: try get rid of this dependency
            IScreenBuffer screenBuffer,
            LJTraceSource tracer,
            IPresentationDataAccess presentationDataAccess,
            IClipboardAccess clipboard,
            IScreenBufferFactory screenBufferFactory,
            IBookmarksFactory bookmarksFactory
            )
        {
            this.view = view;
            this.searchResultModel      = searchResultModel;
            this.screenBuffer           = screenBuffer;
            this.clipboard              = clipboard;
            this.presentationDataAccess = presentationDataAccess;
            this.tracer              = tracer;
            this.searchResultModel   = searchResultModel;
            this.screenBufferFactory = screenBufferFactory;
            this.bookmarksFactory    = bookmarksFactory;

            this.searchResultInplaceHightlightHandler = SearchResultInplaceHightlightHandler;
        }