private static String contextToString(IPluginExecutionContext context) { StringBuilder s = new StringBuilder(); s.AppendFormat(" Depth : {0}", RRUtils.stringVal(context.Depth)); s.AppendLine(); s.AppendFormat(" CorrelationId : {0}", RRUtils.stringVal(context.CorrelationId)); s.AppendLine(); s.AppendFormat(" InitiatingUserId : {0}", RRUtils.stringVal(context.InitiatingUserId)); s.AppendLine(); s.AppendFormat(" IsExecutingOffline : {0}", RRUtils.stringVal(context.IsExecutingOffline)); s.AppendLine(); s.AppendFormat(" IsInTransaction : {0}", RRUtils.stringVal(context.IsInTransaction)); s.AppendLine(); s.AppendFormat(" IsOfflinePlayback : {0}", RRUtils.stringVal(context.IsOfflinePlayback)); s.AppendLine(); s.AppendFormat(" IsolationMode : {0}", RRUtils.stringVal(context.IsolationMode)); s.AppendLine(); s.AppendFormat(" MessageName : {0}", RRUtils.stringVal(context.MessageName)); s.AppendLine(); s.AppendFormat(" Mode : {0}", RRUtils.stringVal(context.Mode)); s.AppendLine(); s.AppendFormat(" OperationCreatedOn : {0}", RRUtils.stringVal(context.OperationCreatedOn)); s.AppendLine(); s.AppendFormat(" OperationId : {0}", RRUtils.stringVal(context.OperationId)); s.AppendLine(); s.AppendFormat(" OrganizationId : {0}", RRUtils.stringVal(context.OrganizationId)); s.AppendLine(); s.AppendFormat(" OrganizationName : {0}", RRUtils.stringVal(context.OrganizationName)); s.AppendLine(); s.AppendFormat(" OwningExtension : {0}", RRUtils.stringVal(context.OwningExtension)); s.AppendLine(); s.AppendFormat(" ParentContext : {0}", RRUtils.stringVal(context.ParentContext)); s.AppendLine(); s.AppendFormat(" PrimaryEntityId : {0}", RRUtils.stringVal(context.PrimaryEntityId)); s.AppendLine(); s.AppendFormat(" PrimaryEntityName : {0}", RRUtils.stringVal(context.PrimaryEntityName)); s.AppendLine(); s.AppendFormat(" RequestId : {0}", RRUtils.stringVal(context.RequestId)); s.AppendLine(); s.AppendFormat(" SecondaryEntityName: {0}", RRUtils.stringVal(context.SecondaryEntityName)); s.AppendLine(); s.AppendFormat(" Stage : {0}", RRUtils.stringVal(context.Stage)); s.AppendLine(); s.AppendFormat(" UserId : {0}", RRUtils.stringVal(context.UserId)); s.AppendLine(); s.AppendFormat(" BusinessUnitId : {0}", RRUtils.stringVal(context.BusinessUnitId)); s.AppendLine(); s.AppendFormat(" Type : {0}", context.GetType().ToString()); s.AppendLine(); s.AppendLine(""); s.AppendLine("Input Parameters"); foreach (KeyValuePair <String, Object> pair in context.InputParameters) { s.AppendFormat("{0} : {1}", RRUtils.stringVal(pair.Key), RRUtils.stringVal(pair.Value)); s.AppendLine(); } s.AppendLine(""); s.AppendLine("Output Parameters"); foreach (KeyValuePair <String, Object> pair in context.OutputParameters) { s.AppendFormat("{0} : {1}", RRUtils.stringVal(pair.Key), RRUtils.stringVal(pair.Value)); s.AppendLine(); } s.AppendLine(""); s.AppendLine("Shared Variables"); foreach (KeyValuePair <String, Object> pair in context.SharedVariables) { s.AppendFormat("{0} : {1}", RRUtils.stringVal(pair.Key), RRUtils.stringVal(pair.Value)); s.AppendLine(); } return(s.ToString()); }
public static String getFormattedValue(Entity entity, String attribute) { String ret = null; if (entity.FormattedValues != null && entity.FormattedValues.Contains(attribute) && entity.FormattedValues[attribute] != null) { ret = RRUtils.stringVal(entity.FormattedValues[attribute]); } return(ret); }