/// <summary> /// Gets (most likely from a cache) the set of correlation properties relevant for the given saga handler. /// </summary> public SagaDataCorrelationProperties GetCorrelationProperties(object message, Saga saga) { var sagaDataType = saga.GetSagaDataType(); var correlationPropertiesForThisSagaDataType = _cachedCorrelationProperties .GetOrAdd(sagaDataType, type => GetCorrelationProperties(saga)); return new SagaDataCorrelationProperties(correlationPropertiesForThisSagaDataType, sagaDataType); }
/// <summary> /// Gets (most likely from a cache) the set of correlation properties relevant for the given saga handler. /// </summary> public SagaDataCorrelationProperties GetCorrelationProperties(object message, Saga saga) { var sagaType = saga.GetType(); var sagaDataType = saga.GetSagaDataType(); var key = $"{sagaType.FullName}/{sagaDataType.FullName}"; var correlationPropertiesForThisSagaDataType = _cachedCorrelationProperties .GetOrAdd(key, _ => GetCorrelationProperties(saga)); return(new SagaDataCorrelationProperties(correlationPropertiesForThisSagaDataType, sagaDataType)); }
/// <summary> /// Gets (most likely from a cache) the set of correlation properties relevant for the given saga handler. /// </summary> public SagaDataCorrelationProperties GetCorrelationProperties(object message, Saga saga) { var sagaType = saga.GetType(); var sagaDataType = saga.GetSagaDataType(); var key = $"{sagaType.FullName}/{sagaDataType.FullName}"; var correlationPropertiesForThisSagaDataType = _cachedCorrelationProperties .GetOrAdd(key, _ => GetCorrelationProperties(saga)); return new SagaDataCorrelationProperties(correlationPropertiesForThisSagaDataType, sagaDataType); }