public CommunicationObject(Connection connection, bool useExclusiveAccess = false)
        {
            header = new Header(connection);
            md5    = MD5.Create();

            if (useExclusiveAccess)
            {
                simpleLock.Enter();
            }

            this.useExclusiveAccess = useExclusiveAccess;
            this.connection         = connection;
        }
Exemple #2
0
 public void Add(IEventListener listener)
 {
     subscribersLock.Enter();
     subscribers.Add(listener);
     subscribersLock.Exit();
 }