コード例 #1
0
 /// <summary>
 /// 配置节点信息
 /// </summary>
 /// <param name="model"></param>
 public static void SetNode(Models.ServerNodeEntity model)
 {
     if (model == null)
     {
         return;
     }
     NodeSetting = new NodeSetting();
     NodeSetting.IdentityName = model.NodeName;
     NodeSetting.Role         = model.NodeType;
     NodeSetting.Protocol     = model.AccessProtocol;
     NodeSetting.IP           = model.Host.Split(':')[0];
     NodeSetting.Port         = Convert.ToInt32(model.Host.Split(':')[1]);
     NodeSetting.Priority     = model.Priority;
     NodeSetting.MachineName  = model.MachineName;
 }
コード例 #2
0
 public static void SetNode(NodeSetting setting)
 {
     NodeSetting = setting;
 }