public IServant CreateServant <T>(ulong objectId, T subject) where T : class { if (Log.IsDebugEnabled) { Log.DebugFormat("{0}: Creating new servant (#{3}) '{1}' implementing '{2}'", _remotingEndPoint.Name, subject.GetType().FullName, typeof(T).FullName, objectId ); } var servant = _codeGenerator.CreateServant(_remotingEndPoint, _endPointChannel, objectId, subject); lock (_syncRoot) { _servantsById.Add(objectId, servant); _servantsBySubject.Add(subject, servant); } return(servant); }