コード例 #1
0
        string GetNormalizedHistoryEventEntityTrace(int index, string message, OrchestrationHistoryEventEntity entity)
        {
            string serializedHistoryEvent = Utils.EscapeJson(JsonConvert.SerializeObject(entity.HistoryEvent));
            int    historyEventLength     = serializedHistoryEvent.Length;

            if (historyEventLength > MaxDisplayStringLengthForAzureTableColumn)
            {
                serializedHistoryEvent =
                    serializedHistoryEvent.Substring(0, MaxDisplayStringLengthForAzureTableColumn) +
                    " ....(truncated)..]";
            }

            return
                (GetFormattedLog(
                     string.Format(
                         message + " - #{0} - Instance Id: {1}, Execution Id: {2}, HistoryEvent Length: {3}\n{4}",
                         index, entity.InstanceId, entity.ExecutionId, historyEventLength, serializedHistoryEvent)));
        }
コード例 #2
0
 bool CompareHistoryEntity(OrchestrationHistoryEventEntity expected, OrchestrationHistoryEventEntity actual)
 {
     // TODO : history comparison!
     return(expected.InstanceId.Equals(actual.InstanceId) && expected.ExecutionId.Equals(actual.ExecutionId) &&
            expected.SequenceNumber == actual.SequenceNumber);
 }