public SetCorrelationIdMessageSendTopology(ISetCorrelationId <T> setCorrelationId) { if (setCorrelationId == null) { throw new ArgumentNullException(nameof(setCorrelationId)); } _filter = new SetCorrelationIdFilter <T>(setCorrelationId); }
public bool TryGetSetCorrelationId(out ISetCorrelationId <T> setCorrelationId) { var correlatedByInterface = typeof(T).GetInterface <CorrelatedBy <Guid> >(); if (correlatedByInterface != null) { var objectType = typeof(CorrelatedBySetCorrelationId <>).MakeGenericType(typeof(T)); setCorrelationId = (ISetCorrelationId <T>)Activator.CreateInstance(objectType); return(true); } setCorrelationId = null; return(false); }
public bool TryGetSetCorrelationId(out ISetCorrelationId <T> setCorrelationId) { var propertyInfo = typeof(T).GetProperty(_propertyName); if (propertyInfo != null && propertyInfo.PropertyType == typeof(Guid)) { setCorrelationId = new PropertySetCorrelationId <T>(propertyInfo); return(true); } if (propertyInfo != null && propertyInfo.PropertyType == typeof(Guid?)) { setCorrelationId = new NullablePropertySetCorrelationId <T>(propertyInfo); return(true); } setCorrelationId = null; return(false); }
MessageCorrelationCache(ISetCorrelationId <T> setCorrelationId) { _setCorrelationIdPipe = new Lazy <ISetCorrelationId <T> >(() => setCorrelationId); }
public SetCorrelationIdFilter(ISetCorrelationId <T> setCorrelationId) { _setCorrelationId = setCorrelationId; }
public bool TryGetSetCorrelationId(out ISetCorrelationId <T> setCorrelationId) { setCorrelationId = _setCorrelationId; return(true); }
public SetCorrelationIdSelector(ISetCorrelationId <T> setCorrelationId) { _setCorrelationId = setCorrelationId; }
public void SetCorrelationId(ISetCorrelationId <TMessage> setCorrelationId) { _selectors.Insert(0, new SetCorrelationIdSelector <TMessage>(setCorrelationId)); }