using System; namespace UnityAtoms.Extensions { public static class IObservableExtensions { public static IObservable MergeObservables( this IObservable observable1, IObservable observable2, Func createCombinedModel, T1 initialValue1 = default(T1), T2 initialValue2 = default(T2)) { return new MergeObservables(observable1, observable2, createCombinedModel, initialValue1, initialValue2); } public static IObservable MergeObservables( this IObservable observable1, IObservable observable2, IObservable observable3, Func createCombinedModel, T1 initialValue1 = default(T1), T2 initialValue2 = default(T2), T3 initialValue3 = default(T3)) { return new MergeObservables(observable1, observable2, observable3, createCombinedModel, initialValue1, initialValue2, initialValue3); } public static IObservable MergeObservables( this IObservable observable1, IObservable observable2, IObservable observable3, IObservable observable4, Func createCombinedModel, T1 initialValue1 = default(T1), T2 initialValue2 = default(T2), T3 initialValue3 = default(T3), T4 initialValue4 = default(T4)) { return new MergeObservables(observable1, observable2, observable3, observable4, createCombinedModel, initialValue1, initialValue2, initialValue3, initialValue4); } public static IObservable MergeObservables( this IObservable observable1, IObservable observable2, IObservable observable3, IObservable observable4, IObservable observable5, Func createCombinedModel, T1 initialValue1 = default(T1), T2 initialValue2 = default(T2), T3 initialValue3 = default(T3), T4 initialValue4 = default(T4), T5 initialValue5 = default(T5)) { return new MergeObservables(observable1, observable2, observable3, observable4, observable5, createCombinedModel, initialValue1, initialValue2, initialValue3, initialValue4, initialValue5); } } }