Tuesday, May 5, 2020

What uses a IComponentRegistryBuilder?

This is Autofac stuff. I found a library online that has ComponentRegistryBuilder implementing both IDisposable and IComponentRegistryBuilder. I'd stop now, but I wanted to mention that this was inside:

public event EventHandler<ComponentRegisteredEventArgs> Registered
{
   add
   {
      lock (_synchRoot)
      {
         Properties["x"] = GetRegistered() + value;
      }
   }
   
   remove
   {
      lock (_synchRoot)
      {
         Properties["x"] = GetRegistered() - value;
      }
   }
}

 
 

At the top of the file, _synchRoot is defined like so:

private readonly object _synchRoot = new object();

No comments:

Post a Comment