本文整理汇总了C#中CodeActivityContext.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CodeActivityContext.ToString方法的具体用法?C# CodeActivityContext.ToString怎么用?C# CodeActivityContext.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeActivityContext
的用法示例。
在下文中一共展示了CodeActivityContext.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getAPIHref
/// <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;
}
}