Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2013-01-22 12:25:22 +0400
committerAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2013-01-22 12:25:22 +0400
commitcde9fc6a8fe569203cb991121a35c2a9c7f4c420 (patch)
tree8633a637be4973b221d9c7e9378af5e0a08b5670 /Rx/NET/Source/System.Reactive.Linq/Reactive/EventPatternSource.cs
parent8911e1d3f169a0e378b4e237926269d9218c8fd3 (diff)
import 2b5dbddd740b, new directory structure in the original rx.
Diffstat (limited to 'Rx/NET/Source/System.Reactive.Linq/Reactive/EventPatternSource.cs')
-rw-r--r--Rx/NET/Source/System.Reactive.Linq/Reactive/EventPatternSource.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Rx/NET/Source/System.Reactive.Linq/Reactive/EventPatternSource.cs b/Rx/NET/Source/System.Reactive.Linq/Reactive/EventPatternSource.cs
new file mode 100644
index 0000000..742970e
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Linq/Reactive/EventPatternSource.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive
+{
+ class EventPatternSource<TEventArgs> : EventPatternSourceBase<object, TEventArgs>, IEventPatternSource<TEventArgs>
+#if !NO_EVENTARGS_CONSTRAINT
+ where TEventArgs : EventArgs
+#endif
+ {
+ public EventPatternSource(IObservable<EventPattern<object, TEventArgs>> source, Action<Action<object, TEventArgs>, /*object,*/ EventPattern<object, TEventArgs>> invokeHandler)
+ : base(source, invokeHandler)
+ {
+ }
+
+ event EventHandler<TEventArgs> IEventPatternSource<TEventArgs>.OnNext
+ {
+ add
+ {
+ Add(value, (o, e) => value(o, e));
+ }
+
+ remove
+ {
+ Remove(value);
+ }
+ }
+ }
+}