예제 #1
0
        public static void UseTriggerListener(this ISystemContext context, ITriggerListener listener)
        {
            var router = context.ResolveService <TriggerEventRouter>();

            if (router == null)
            {
                context.RegisterService <TriggerEventRouter>();
            }

            context.RegisterInstance(listener);
        }
예제 #2
0
        private void Configure(ISystemContext context)
        {
            var config   = context.ResolveService <IConfiguration>();
            var hashSize = DefaultHashSize;
            var maxSize  = config.GetInt32("system.tableCellCache.maxSize", DefaultMaxSize);

            MaxCellSize = config.GetInt32("system.tableCellCache.maxCellSize", DefaultMaxCellSize);

            var baseCache = new SizeLimitedCache(maxSize);

            cache = new Cache(this, baseCache, hashSize);

            Context = context;
        }
예제 #3
0
 public static IIndexFactory ResolveIndexFactory(this ISystemContext context, string indexType)
 {
     return(context.ResolveService <IIndexFactory>(indexType));
 }