public static AgentInfo GetAgentInfo() { string identifier; if (Debugger.IsAttached) { identifier = "i-701c521a"; } else { switch (AgentConfig.GetCloudName()) { case "datacenter": identifier = GetMacAddress(); break; case "azure": identifier = GetVmUUID(); break; default: identifier = new EC2InstanceMetadata().InstanceId; break; } } return(new AgentInfo { Identifier = identifier, CloudName = AgentConfig.GetCloudName() }); }
public static AgentInfo GetAgentInfo() { string instanceId = null; if (System.Diagnostics.Debugger.IsAttached) { instanceId = "i-701c521a"; } else { instanceId = new EC2InstanceMetadata().InstanceId; } return(new AgentInfo { Instance = instanceId, CloudName = AgentConfig.GetCloudName() }); }