-
[C#] Observable.FromEvent<>()C#/기초 2023. 12. 27. 13:52
Observable.FromEvent< TEventArgs >( addHandler , removeHandler)
Type Parameters
- TEventArgs
The type of event.
Parameters
- addHandler
Type: System.Action<Action<TEventArgs>>
Action that attaches the given event handler to the underlying .NET event.
- removeHandler
Type: System.Action<Action<TEventArgs>>
Action that detaches the given event handler from the underlying .NET event.
Return Value
Type: System.IObservable<TEventArgs>
Observable sequence that contains data representations of invocations of the underlying .NET event.TagInfo를 이벤트 타입(전달 인자)으로하는 이벤트를 등록하여
이벤트가 발동할 때 마다 이벤트 타입의 객체를 관찰 가능한 IObservable< TEventArgs > 시퀀스 형태로 반환.
TagInfo를 이벤트 타입(전달 인자)으로하는 이벤트
TagInfo를 이벤트 타입(전달 인자)으로하는 이벤트 발동
https://learn.microsoft.com/en-us/previous-versions/dotnet/reactive-extensions/hh211795(v=vs.103)
Observable.FromEvent(TEventArgs) Method (Action(Action(TEventArgs)), Action(Action(TEventArgs))) (System.Reactive.Linq)
Table of contents Observable.FromEvent Method (Action >, Action >) Article 06/28/2011 In this article --> Converts a .NET event to an observable sequence. Namespace: System.Reactive.Linq Assembly: System.Reactive (in System.Reactive.dll) Syntax 'Declar
learn.microsoft.com
How to use Observable.FromEvent instead of FromEventPattern and avoid string literal event names
I'm learning my way around Rx within WinForms, and have the following code: // Create an observable from key presses, grouped by the key pressed var groupedKeyPresses = Observable.FromEventPattern...
stackoverflow.com
https://learn.microsoft.com/en-us/dotnet/api/system.iobservable-1?view=net-8.0
IObservable<T> Interface (System)
Defines a provider for push-based notification.
learn.microsoft.com
https://learn.microsoft.com/ko-kr/dotnet/standard/events/observer-design-pattern
관찰자 디자인 패턴 - .NET
.NET의 관찰자 디자인 패턴에 대해 알아봅니다. 이 패턴은 구독자가 공급자에 등록하고 공급자로부터 알림을 받을 수 있게 합니다.
learn.microsoft.com
728x90'C# > 기초' 카테고리의 다른 글
[C#] SuppressMessage (0) 2024.01.16 [C#] VS 빌드 이벤트, 시스템 매크로 (1) 2024.01.08 [C#] NuGet Package Explorer (1) 2023.12.22 [C#] Using AppDomain in C# (0) 2023.12.12 [C#] _ = (0) 2023.11.30 댓글
- TEventArgs