Ejemplo n.º 1
0
 private Context(ILogger logger, MemoryCache memoryCache,
                 DiskCache diskCache, NativeCache nativeCache,
                 Dictionary <Type, Type> awaiters, Dictionary <Type, Type> mappers)
 {
     Logger       = logger;
     MemoryCache  = memoryCache;
     DiskCache    = diskCache;
     NativeCache  = nativeCache;
     awaiterTypes = awaiters;
     mapperTypes  = mappers;
 }
Ejemplo n.º 2
0
            public Builder(Context context)
            {
                logger      = context.Logger;
                memoryCache = context.MemoryCache;
                diskCache   = context.DiskCache;
                nativeCache = context.NativeCache;

                foreach (var p in context.awaiterTypes)
                {
                    awaiterTypes[p.Key] = p.Value;
                }

                foreach (var p in context.mapperTypes)
                {
                    mapperTypes[p.Key] = p.Value;
                }
            }
Ejemplo n.º 3
0
 public Builder WithLogger(ILogger loggerArg)
 {
     logger = loggerArg;
     return(this);
 }