Advertisement
Advertisement

新足迹

 找回密码
 注册
新足迹 门户 IT专业论坛 查看内容

这段代码哪位高人给解释一下?

2010-9-16 12:22| 发布者: linkspeed | 查看: 1927| 原文链接

private IObservable<SW.DragDropKeyStates> GetKeyStatesChanged()
        {
            return
                Observable.Merge(
                // before drag starts listen only root visual
                    from _ in
                        Observable.Merge(Observable.Return(new Unit()),
                                         _itemDragCompleted.IgnoreAll())
                    from keyStates in
                        Observable
                            .Return(Application.Current)
                            .ObserveOnDispatcher()
                            .SelectMany(app => app.RootVisual.GetKeyStateChangedAlways(_keyStates))
                            .TakeUntil(_itemDragStarted)
                    select keyStates,

                // after drag starts listen to root visual and all siblings
                    from _ in _itemDragStarted
                    from keyStates in
                        Observable
                            .Return(Application.Current)
                            .ObserveOnDispatcher()
                            .SelectMany(app => app.RootVisual.GetKeyStateChangedOnSelfAndSiblingsAlways(_keyStates))
                            .TakeUntil(_itemDragCompleted)
                    select keyStates);
        }

主要是    from _ in 里面的 _
Advertisement
Advertisement


Advertisement
Advertisement
返回顶部