static OperationContext() { s_operationUniqueID = Guid.NewGuid().ToString().Substring(0, 4); s_operationID = new OperationID() { OpCounter = s_operationCounter, OperationId = s_operationUniqueID }; }
private void CreateOperationId() { long opCounter = 0; lock (s_lock) { opCounter = s_operationCounter++; } OperationID operationId = new OperationID(s_operationUniqueID,opCounter); Add(OperationContextFieldName.OperationId, operationId); }
public static EventId CreateEventId(OperationID opId) { EventId eventId = new EventId(); if (opId != null) { eventId._eventUniqueId = opId.OperationId; eventId._operationCounter = opId.OpCounter; } return(eventId); }
private void CreateOperationId() { long opCounter = 0; lock (s_lock) { opCounter = s_operationCounter++; } OperationID operationId = new OperationID(s_operationUniqueID, opCounter); Add(OperationContextFieldName.OperationId, operationId); }
public static EventId CreateEventId(OperationID opId) { EventId eventId = new EventId(); if (opId != null) { eventId._eventUniqueId = opId.OperationId; eventId._operationCounter = opId.OpCounter; } return eventId; }