コード例 #1
0
 public void AddConvention(IPublishTopologyConvention convention)
 {
     lock (_lock)
     {
         _conventions.Add(convention);
     }
 }
コード例 #2
0
 public bool TryAddConvention(IPublishTopologyConvention convention)
 {
     lock (_lock)
     {
         if (_conventions.Any(x => x.GetType() == convention.GetType()))
         {
             return(false);
         }
         _conventions.Add(convention);
         return(true);
     }
 }