-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
sgen/src/Bonsai.Sgen/CSharpTypeMatchTemplate.cs
Lines 76 to 87 in fbf470d
| @$"return System.Reactive.Linq.Observable.Create<{genericTypeParameter.Name}>(observer => | |
| {{ | |
| var sourceObserver = System.Reactive.Observer.Create<{ModelType.TypeName}>( | |
| value => | |
| {{ | |
| var match = value as {genericTypeParameter.Name}; | |
| if (match != null) observer.OnNext(match); | |
| }}, | |
| observer.OnError, | |
| observer.OnCompleted); | |
| return System.ObservableExtensions.SubscribeSafe(source, sourceObserver); | |
| }})")) |
Currently constrains the input of the operator to the expected base type.
In some cases, the ability to operate on "object" may be interesting. For instance, since casting to object is supported via ExpressionTransform, it is possible to "Merge" two distinct base classes into the same sequence and dynamically Match their children downstream:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
