public static void AssignNetwork(NetworkType networkType) { if (!Networks.IsValueCreated) { throw new InvalidOperationException("RootService is not bootstrapped"); } _bitcoinNetwork = CreateNetwork(networkType); }
public static void Bootstrap(NetworkType networkType) { if (_bitcoinNetwork != null) { throw new InvalidOperationException(); } lock (Mutex) { _bitcoinNetwork = CreateNetwork(networkType); } }