public int Enqueue(MessageManager message) { lock (this) { this.prog++; this.messages[this.prog] = message; message.Enqueued(this.prog); return this.prog; } }