public virtual void RegisterDscAgent(Guid agentId, RegisterDscAgentRequestBody detail) { var regPath = Path.Combine(RegistrationSavePath, $"{agentId}.json"); if (File.Exists(regPath)) { // TODO: Do nothing? Does the protocol allow unlimited re-registrations? //throw new Exception("agent ID already registered"); } File.WriteAllText(regPath, JsonConvert.SerializeObject(detail)); }
public void RegisterDscAgent(Guid agentId, RegisterDscAgentRequestBody detail) { // Return value is ignored, if no exceptions are thrown up, we assume success ThreadSafeInvokeNoResult("Register-TugNode", agentId, detail); }