示例#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;
        }
示例#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;
        }