当前位置: 首页>>代码示例>>C#>>正文


C# IObservable.ObserveOnDispatcher方法代码示例

本文整理汇总了C#中IObservable.ObserveOnDispatcher方法的典型用法代码示例。如果您正苦于以下问题:C# IObservable.ObserveOnDispatcher方法的具体用法?C# IObservable.ObserveOnDispatcher怎么用?C# IObservable.ObserveOnDispatcher使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IObservable的用法示例。


在下文中一共展示了IObservable.ObserveOnDispatcher方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InteractionsContainer

        public InteractionsContainer(IObservable<ActivateInteractionMsg> activateInteractionObservable)
        {
            _interactionModelsReadOnly = new ReadOnlyObservableCollection<IInteractionModel>(_interactionModels);

            activateInteractionObservable
                .ObserveOnDispatcher()
                .Subscribe(OnAttentionRequested);
        }
开发者ID:flq,项目名称:SoftLattice,代码行数:8,代码来源:InteractionsContainer.cs

示例2: ReactiveEditCommand

 public ReactiveEditCommand(
     Func<IEditor> createEditor,
     IObservable<bool> canExecute,
     IScheduler editorScheduler,
     object editable)
 {
     Editable = editable;
     CreateEditor = createEditor;
     CanExecute = canExecute.ObserveOnDispatcher();
     EditorScheduler = editorScheduler;
 }
开发者ID:Weingartner,项目名称:SolidworksAddinFramework,代码行数:11,代码来源:ReactiveEditCommand.cs

示例3: RenderFrameObservableChanged

        void RenderFrameObservableChanged(IObservable<RenderFrame> renderFrameObservable)
        {
            if (m_compositeDisposable != null)
            {
                m_compositeDisposable.Dispose();
            }
            m_compositeDisposable = new CompositeDisposable();

            renderFrameObservable
                .ObserveOnDispatcher()
                .Subscribe(frame =>
                {
                    // update & draw
                    m_renderer.Render(frame);
                })
                .AddTo(m_compositeDisposable)
                ;
        }
开发者ID:ousttrue,项目名称:ModelMotionIO,代码行数:18,代码来源:D3D11Host.cs

示例4: CreateMonitor

        protected override IPollingMonitor CreateMonitor(Dictionary<string, string> configuration)
        {
            var username = configuration["Username"];
            var password = configuration["Password"];
            var uri = configuration["Uri"];
            var buildTypeIds = new string[0];

            if (configuration.ContainsKey("BuildTypeIds"))
            {
                buildTypeIds = configuration["BuildTypeIds"].Split(',');
            }

            var client = new TeamCityClient(uri, username, password);

            var monitor = new TeamCityBuildMonitor(client, buildTypeIds);

            _eventSource = Observable.FromEventPattern<BuildEventArgs>(monitor, "BuildUpdated").Select(e=>e.EventArgs.Build);

            _eventHandler = _eventSource.ObserveOnDispatcher().Subscribe(ReceiveBuild);

            return monitor;
        }
开发者ID:null-loop,项目名称:RHAL9000,代码行数:22,代码来源:TeamCityBuildsViewModel.cs

示例5: WrapObservableQuery

 protected override IObservable<TrackingInformation> WrapObservableQuery(IObservable<TrackingInformation> qry)
 {
     return qry.ObserveOnDispatcher();
 }
开发者ID:tlaothong,项目名称:WorkHorse,代码行数:4,代码来源:DispatcherTrackingObserverBase.cs

示例6: PositionPresenter

 public PositionPresenter(IMappingService MappingService, IObservable<EarthPoint> Position)
 {
     _mappingService = MappingService;
     Position.ObserveOnDispatcher()
             .Subscribe(RefreshPosition);
 }
开发者ID:NpoSaut,项目名称:netEMapTools,代码行数:6,代码来源:PositionPresenter.cs


注:本文中的IObservable.ObserveOnDispatcher方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。