<PackageReference Include="System.Reactive" Version="6.0.0-preview.1" />
    
    
	
	
		
		
		
	 
	
	
        
                
                Cast<TSource, TResult>
                
                    sealed class Cast<
TSource, 
TResult> : 
Producer<
TResult, 
_<
TSource, 
TResult>>
                
 
                
                
                
using System.
Runtime.
CompilerServices;
namespace System.
Reactive.
Linq.
ObservableImpl
{
    [
System.
Runtime.
CompilerServices.
NullableContext(
1)]
    [
System.
Runtime.
CompilerServices.
Nullable(
new byte[] {
        
0,
        
1,
        
1,
        
1,
        
1
    })]
    
internal sealed class Cast<[
System.
Runtime.
CompilerServices.
Nullable(
2)] 
TSource, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
TResult> : 
Producer<
TResult, 
Cast<
TSource, 
TResult>.
_>
    {
        [
System.
Runtime.
CompilerServices.
Nullable(
new byte[] {
            
0,
            
1,
            
1
        })]
        
internal sealed class _ : 
Sink<
TSource, 
TResult>
        {
            
public _(
IObserver<
TResult> 
observer)
                : 
base(
observer)
            {
            }
            
public override void OnNext(
TSource value)
            {
                
TResult value2;
                
try {
                    
value2 = (
TResult)(
object)
value;
                } 
catch (
Exception error) {
                    
ForwardOnError(
error);
                    
return;
                }
                
ForwardOnNext(
value2);
            }
        }
        
private readonly IObservable<
TSource> 
_source;
        
public Cast(
IObservable<
TSource> 
source)
        {
            
_source = 
source;
        }
        [
return: 
System.
Runtime.
CompilerServices.
Nullable(
new byte[] {
            
1,
            
0,
            
0
        })]
        
protected override _ CreateSink(
IObserver<
TResult> 
observer)
        {
            
return new _(
observer);
        }
        
protected override void Run([
System.
Runtime.
CompilerServices.
Nullable(
new byte[] {
            
1,
            
0,
            
0
        })] 
_ sink)
        {
            
sink.
Run(
_source);
        }
    }
}