public void AddConvention(IPublishTopologyConvention convention) { lock (_lock) { _conventions.Add(convention); } }
public bool TryAddConvention(IPublishTopologyConvention convention) { lock (_lock) { if (_conventions.Any(x => x.GetType() == convention.GetType())) { return(false); } _conventions.Add(convention); return(true); } }