示例#1
0
 public static GrpcBaseHelper Instance()
 {
     if (_helper == null)
     {
         _helper = NestedHepler.Instace;
     }
     return(_helper);
 }
示例#2
0
 public static GrpcBaseHelper Instance(bool Debug)
 {
     if (_helper == null)
     {
         _helper = NestedHepler.Instace;
     }
     _helper.debug = Debug;
     return(_helper);
 }
示例#3
0
 public static GrpcBaseHelper Instance(string host, int port)
 {
     if (_helper == null)
     {
         _helper = NestedHepler.Instace;
     }
     _helper.Host = host;
     _helper.Port = port;
     return(_helper);
 }
示例#4
0
 public GossipServiceClient(GrpcBaseHelper h, string logRootPath, string logName)
 {
     this.gossipClient = new GossipTask.GossipTaskClient(h.NewChannel());
     this.helper       = h;
     this.logPath      = logRootPath;
     if (String.IsNullOrEmpty(logName))
     {
         this.logPathName = logRootPath + System.IO.Path.DirectorySeparatorChar + "gossip.log";
     }
     else
     {
         this.logPathName = logRootPath + System.IO.Path.DirectorySeparatorChar + logName;
     }
 }