static StackObject *Subscribe_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Action <System.Int64> @onNext = (System.Action <System.Int64>) typeof(System.Action <System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.IObservable <System.Int64> @source = (System.IObservable <System.Int64>) typeof(System.IObservable <System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = UniRx.ObservableExtensions.Subscribe <System.Int64>(@source, @onNext);

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
示例#2
0
 public AddItemViewModel()
 {
     System.IObservable <bool> okEnabled = this.WhenAnyValue(x => x.Description, x => !string.IsNullOrWhiteSpace(x));
     Ok = ReactiveCommand.Create(() => new TodoItem {
         Description = Description
     }, okEnabled);
     Cancel = ReactiveCommand.Create(() => { });
 }
示例#3
0
    public void ReplaceEventStream(System.IObservable <NetworkEventArgs> newStream)
    {
        var index     = NetworkComponentsLookup.EventStream;
        var component = CreateComponent <EventStreamComponent>(index);

        component.stream = newStream;
        ReplaceComponent(index, component);
    }
示例#4
0
    public NetworkEntity SetEventStream(System.IObservable <NetworkEventArgs> newStream)
    {
        if (hasEventStream)
        {
            throw new Entitas.EntitasException("Could not set EventStream!\n" + this + " already has an entity with EventStreamComponent!",
                                               "You should check if the context already has a eventStreamEntity before setting it or use context.ReplaceEventStream().");
        }
        var entity = CreateEntity();

        entity.AddEventStream(newStream);
        return(entity);
    }
        public static System.IObservable <T> EditorBatchFrame <T>(this System.IObservable <T> self, int skipFrameCount = 0)
        {
            return(new AnonymousObservable <T>(observer =>
            {
                var lastFrame = 0;
                var skippedFrameCount = 0;
                var values = new List <T>();

                void OnUpdate()
                {
                    if (lastFrame == Time.frameCount)
                    {
                        return;
                    }

                    if (skippedFrameCount >= skipFrameCount)
                    {
                        if (values.Count >= 1)
                        {
                            var lastValue = values[values.Count - 1];
                            observer.OnNext(lastValue);
                            values.Clear();
                        }

                        skippedFrameCount = 0;
                    }
                    else
                    {
                        skippedFrameCount++;
                    }

                    lastFrame = Time.frameCount;
                }

                EditorApplication.update += OnUpdate;

                var disposable = self.Subscribe(x => { values.Add(x); }, x =>
                {
                    EditorApplication.update -= OnUpdate;
                    observer.OnError(x);
                }, () =>
                {
                    EditorApplication.update -= OnUpdate;
                    observer.OnCompleted();
                });

                var disposables = new CompositeDisposable();
                disposables.Add(new AnonymousDisposable(() => { EditorApplication.update -= OnUpdate; }));
                disposables.Add(disposable);
                return disposables;
            }));
        }
示例#6
0
    public void ReplaceEventStream(System.IObservable <NetworkEventArgs> newStream)
    {
        var entity = eventStreamEntity;

        if (entity == null)
        {
            entity = SetEventStream(newStream);
        }
        else
        {
            entity.ReplaceEventStream(newStream);
        }
    }
示例#7
0
    private static IInvader CreateInvader(System.IObservable <float> animationSpeed)
    {
        var prefab = Resources.Load <Invader>("Invader");
        var go     = GameObject.Instantiate(prefab.gameObject);

        var invader   = go.GetComponent <Invader>();
        var animator  = invader.GetComponent <Animator>();
        var rigidBody = go.GetComponent <Rigidbody2D>();

        animationSpeed.TakeUntilDestroy(go).Subscribe((val) => {
            animator.speed     = val;
            rigidBody.velocity = Vector2.down * 10 * val;
        });


        Observable.CombineLatest(animationSpeed, Observable.EveryFixedUpdate().Select((u) => 0.0f)).TakeUntilDestroy(go).Subscribe((values) => {
        });



        return(invader);
    }
 public ListObservable(System.IObservable <T> source)
 {
 }
 public static System.Reactive.ListObservable <TSource> ToListObservable <TSource>(this System.IObservable <TSource> source)
 {
     throw null;
 }
 public static System.IObservable <TResult> ManySelect <TSource, TResult>(this System.IObservable <TSource> source, System.Func <System.IObservable <TSource>, TResult> selector)
 {
     throw null;
 }
 public static System.IObservable <TSource> Expand <TSource>(this System.IObservable <TSource> source, System.Func <TSource, System.IObservable <TSource> > selector, System.Reactive.Concurrency.IScheduler scheduler)
 {
     throw null;
 }
示例#12
0
 public static System.IObservable <TSource> Synchronize <TSource>(System.IObservable <TSource> source, object gate)
 {
     throw null;
 }
示例#13
0
 public static System.IObservable <TSource> SubscribeOn <TSource>(System.IObservable <TSource> source, System.Reactive.Concurrency.IScheduler scheduler)
 {
     throw null;
 }
示例#14
0
 public static System.IObservable <TResult> FlatMap <TSource, TCollection, TResult>(this System.IObservable <TSource> source, System.Func <TSource, int, System.IObservable <TCollection> > collectionSelector, System.Func <TSource, int, TCollection, int, TResult> resultSelector)
 {
 }
示例#15
0
 public static System.Reactive.Linq.IQbservable <TOther> FlatMap <TSource, TOther>(this System.Reactive.Linq.IQbservable <TSource> source, System.IObservable <TOther> other)
 {
 }
示例#16
0
 public static void Subscribe <T>(this System.IObservable <T> source, System.Action <T> onNext, System.Action <System.Exception> onError, System.Threading.CancellationToken token)
 {
 }
示例#17
0
 public static void Subscribe <T>(this System.IObservable <T> source, System.Threading.CancellationToken token)
 {
 }
示例#18
0
 public static System.IObservable <TResult> FlatMap <TSource, TTaskResult, TResult>(this System.IObservable <TSource> source, System.Func <TSource, int, System.Threading.CancellationToken, System.Threading.Tasks.Task <TTaskResult> > taskSelector, System.Func <TSource, int, TTaskResult, TResult> resultSelector)
 {
 }
示例#19
0
 public static System.IObservable <TSource> SubscribeOn <TSource>(System.IObservable <TSource> source, System.Threading.SynchronizationContext context)
 {
     throw null;
 }
示例#20
0
 public static System.IObservable <TResult> Map <TSource, TResult>(this System.IObservable <TSource> source, System.Func <TSource, int, TResult> selector)
 {
 }
 public static System.IObservable <TSource> Expand <TSource>(this System.IObservable <TSource> source, System.Func <TSource, System.IObservable <TSource> > selector)
 {
     throw null;
 }
示例#22
0
 public static System.IDisposable SubscribeSafe <T>(this System.IObservable <T> source, System.IObserver <T> observer)
 {
     throw null;
 }
 public static System.IObservable <TResult> ForkJoin <TSource1, TSource2, TResult>(this System.IObservable <TSource1> first, System.IObservable <TSource2> second, System.Func <TSource1, TSource2, TResult> resultSelector)
 {
     throw null;
 }
示例#24
0
 public static System.IDisposable Subscribe <T>(this System.IObservable <T> source)
 {
     throw null;
 }
 public static System.IObservable <TResult> ManySelect <TSource, TResult>(this System.IObservable <TSource> source, System.Func <System.IObservable <TSource>, TResult> selector, System.Reactive.Concurrency.IScheduler scheduler)
 {
     throw null;
 }
示例#26
0
 public static System.IDisposable Subscribe <T>(this System.IObservable <T> source, System.Action <T> onNext)
 {
     throw null;
 }
 public static System.Reactive.Linq.IQbservable <TResult> ForkJoin <TSource1, TSource2, TResult>(this System.Reactive.Linq.IQbservable <TSource1> first, System.IObservable <TSource2> second, System.Linq.Expressions.Expression <System.Func <TSource1, TSource2, TResult> > resultSelector)
 {
     throw null;
 }
示例#28
0
 public static void Subscribe <T>(this System.IObservable <T> source, System.Action <T> onNext, System.Action onCompleted, System.Threading.CancellationToken token)
 {
 }
示例#29
0
 void Awake()
 {
     TriggerEnterEvents = gameObject.OnTriggerEnter2DAsObservable();
     TriggerExitEvents  = gameObject.OnTriggerExit2DAsObservable();
 }
示例#30
0
 public static System.IDisposable Subscribe <T>(this System.IObservable <T> source, System.Action <T> onNext, System.Action <System.Exception> onError, System.Action onCompleted)
 {
     throw null;
 }