/// <summary> /// Private method to build proper href for calling out to the RightScale API based on the AuditObjectType provided /// </summary> /// <param name="context">Code Activity Context</param> /// <returns>formatted href for creating an audit entry</returns> private string getAPIHref(CodeActivityContext context) { switch (auditObjectType.Get(context)) { case AuditableObject.Server: return(string.Format(RightScale.netClient.APIHrefs.ServerByID, auditObjectID)); case AuditableObject.ServerArray: return(string.Format(RightScale.netClient.APIHrefs.ServerArrayById, auditObjectID)); case AuditableObject.Deployment: return(string.Format(RightScale.netClient.APIHrefs.DeploymentByID, auditObjectID)); default: LogWarning("Could not determine api href for " + context.ToString()); return(string.Empty); } }
/// <summary> /// Private method to build proper href for calling out to the RightScale API based on the AuditObjectType provided /// </summary> /// <param name="context">Code Activity Context</param> /// <returns>formatted href for creating an audit entry</returns> private string getAPIHref(CodeActivityContext context) { switch (auditObjectType.Get(context)) { case AuditableObject.Server: return string.Format(RightScale.netClient.APIHrefs.ServerByID, auditObjectID); case AuditableObject.ServerArray: return string.Format(RightScale.netClient.APIHrefs.ServerArrayById, auditObjectID); case AuditableObject.Deployment: return string.Format(RightScale.netClient.APIHrefs.DeploymentByID, auditObjectID); default: LogWarning("Could not determine api href for " + context.ToString()); return string.Empty; } }