[WIP] firebase init Error

This commit is contained in:
2024-08-02 20:09:59 +08:00
commit b77fd9f498
7087 changed files with 1466846 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using System;
using UniRx.Operators;
namespace UniRx.Operators
{
internal class AsObservableObservable<T> : OperatorObservableBase<T>
{
readonly IObservable<T> source;
public AsObservableObservable(IObservable<T> source)
: base(source.IsRequiredSubscribeOnCurrentThread())
{
this.source = source;
}
protected override IDisposable SubscribeCore(IObserver<T> observer, IDisposable cancel)
{
return source.Subscribe(new AsObservable(observer, cancel));
}
class AsObservable : OperatorObserverBase<T, T>
{
public AsObservable(IObserver<T> observer, IDisposable cancel) : base(observer, cancel)
{
}
public override void OnNext(T value)
{
base.observer.OnNext(value);
}
public override void OnError(Exception error)
{
try { observer.OnError(error); }
finally { Dispose(); }
}
public override void OnCompleted()
{
try { observer.OnCompleted(); }
finally { Dispose(); }
}
}
}
}