Exemplo n.º 1
0
        public CullingItemFactory()
        {
            var shadowPool = new GenericPool <ShadowCullingHandler>();

            shadowPool.SetMeta(new ShadowCullingHandler(shadowPool.Reuse));
            _shadowPool = shadowPool;

            var probePool = new GenericPool <ProbeCullingHandler>();

            probePool.SetMeta(new ProbeCullingHandler(probePool.Reuse));
            _probePool = probePool;
        }
Exemplo n.º 2
0
        static SimpleEventBus()
        {
            if (Connection == null)
            {
                Connection = (new ConnectionFactory {
                    HostName = "localhost"
                }).CreateConnection();
            }

            channelPool     = new ChannelPool(Connection, Environment.ProcessorCount * 2);
            EventDictionary = new Dictionary <Type, SimpleEventDelegate>();
        }
Exemplo n.º 3
0
 public static IEnumerable <object> QueryFilled(this IGenericPool cachier, string name, string query)
 {
     return(cachier.Get(name, cachier.Query(name, new UriQuery(query))));
 }
Exemplo n.º 4
0
 public static IEnumerable <object> Get(this IGenericPool cachier, string name, IEnumerable <Guid> ids)
 {
     return(ids.Select(k => cachier.GetLater(name, k)).ToArray().Select(k => k.Value).ToArray());
 }
Exemplo n.º 5
0
 public static object Get(this IGenericPool cachier, ResourceDescription resource)
 {
     return(cachier.Get(resource.ResourceName, resource.ResourceKey));
 }