public static Func <ReplicatedObject, ObjectMessageSender> CreateFactory( IMessageSender sender, TransportGroupRouter groupRouter, TransportGroupId group, IBasicObjectPool <MulticastNetworkMessage> networkMessages) { return(@object => new ObjectMessageSender(sender, groupRouter, group, networkMessages, @object)); }
public ObjectPool(Func <ManagedObject <T> > factory, int growthStep) { Action <PooledObject> returnToPool = pooledObject => _baseObjectPool.Return(pooledObject); _baseObjectPool = new BasicObjectPool <PooledObject>( pool => new PooledObject(returnToPool, @object: factory()), onReturnToPool: @object => @object.ManagedObject.OnReturnedToPool(), onTakenFromPool: @object => @object.ManagedObject.OnTakenFromPool(), growthStep: growthStep); }
public ObjectMessageSender(IMessageSender sender, TransportGroupRouter groupRouter, TransportGroupId group, IBasicObjectPool <MulticastNetworkMessage> networkMessages, ReplicatedObject o) { _sender = sender; _object = o; _groupRouter = groupRouter; _group = group; _networkMessages = networkMessages; }
public MulticastNetworkMessage(IBasicObjectPool <MulticastNetworkMessage> pool, MessageType toObjectIdMessageType) { _pool = pool; _toObjectIdMessageType = toObjectIdMessageType; }