Exemplo n.º 1
0
        public static T WaitTillRunning <T>(this IpfsDaemonBase daemon, Func <T> onRunning)
        {
            daemon.Start();

enjoyGotoPurists:

            if (daemon.State() == IpFsDaemonState.Running || daemon.State() == IpFsDaemonState.System)
            {
                return(onRunning.Invoke());
            }

            Thread.Sleep(1);

            goto enjoyGotoPurists;
        }
Exemplo n.º 2
0
        public static void WaitTillRunning(this IpfsDaemonBase daemon, Action onRunning)
        {
            daemon.Start();

enjoyGotoPurists:

            if (daemon.State() == IpFsDaemonState.Running || daemon.State() == IpFsDaemonState.System)
            {
                onRunning.Invoke();
                return;
            }

            Thread.Sleep(1);

            goto enjoyGotoPurists;
        }