public static void UseTriggerListener(this ISystemContext context, ITriggerListener listener) { var router = context.ResolveService <TriggerEventRouter>(); if (router == null) { context.RegisterService <TriggerEventRouter>(); } context.RegisterInstance(listener); }
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; }
public static IIndexFactory ResolveIndexFactory(this ISystemContext context, string indexType) { return(context.ResolveService <IIndexFactory>(indexType)); }