CoreInterfaceExtensions.cs
1 using BlockchainUtils; 2 using Core; 3 4 namespace GethPlugin 5 { 6 public static class CoreInterfaceExtensions 7 { 8 public static GethDeployment DeployGeth(this CoreInterface ci, Action<IGethSetup> setup) 9 { 10 return Plugin(ci).DeployGeth(setup); 11 } 12 13 public static IGethNode WrapGethDeployment(this CoreInterface ci, GethDeployment deployment, BlockCache blockCache) 14 { 15 return Plugin(ci).WrapGethDeployment(deployment, blockCache); 16 } 17 18 public static IGethNode StartGethNode(this CoreInterface ci, BlockCache blockCache, Action<IGethSetup> setup) 19 { 20 var deploy = DeployGeth(ci, setup); 21 return WrapGethDeployment(ci, deploy, blockCache); 22 } 23 24 private static GethPlugin Plugin(CoreInterface ci) 25 { 26 return ci.GetPlugin<GethPlugin>(); 27 } 28 } 29 }