/// <summary>
 /// Initializes a new instance of the <see cref="SharedMemoryConnection{TRead, TWrite}"/> class.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="name">The name.</param>
 /// <param name="serverStream">The server stream.</param>
 internal SharedMemoryConnection(int id, string name, SharedMemoryStream serverStream)
 {
     Id             = id;
     Name           = name;
     _streamWrapper = new SharedMemoryStreamWrapper <TRead, TWrite>(serverStream);
 }
 public static SharedMemoryConnection <TRead, TWrite> CreateConnection <TRead, TWrite>(SharedMemoryStream sharedMemoryStream)
     where TRead : class
     where TWrite : class
 {
     return(new SharedMemoryConnection <TRead, TWrite>(++_lastId, "Client " + _lastId, sharedMemoryStream));
 }