Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 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);
 }