Example #1
0
 public SparkBot(
     IPluginManager pluginManager,
     ICacheUtility cacheUtility,
     IConfig config) : base(pluginManager)
 {
     this.cacheUtility = cacheUtility;
     this.config       = config;
 }
 /// <summary>
 /// constructor method
 /// </summary>
 /// <param name="host">host and port</param>
 public RedisManager(string host)
 {
     //Cache initilization
     _cacheManagerUtility = new CacheUtility <T>(host);
     //Set receive event
     _cacheManagerUtility.OnReceiveMessage += ReceiveMessage;
     //Initialize
     _database = 0;
 }
 /// <summary>
 /// The constructor of <see cref="EmployeeLoginSystemHandler"/> type handler.
 /// </summary>
 /// <param name="cacheUtility">The cache utility.</param>
 /// <param name="userAPIClient">The user API client.</param>
 /// <param name="baseURLoptions">The base URL options.</param>
 /// <param name="serviceToServiceAuthOptions">The service to service authentication options.</param>
 public EmployeeLoginSystemHandler(ICacheUtility cacheUtility,
                                   IUserAPIClient userAPIClient,
                                   IOptions <BaseURLOptions> baseURLoptions,
                                   IOptions <ServiceToServiceAuthOptions> serviceToServiceAuthOptions)
 {
     CacheUtility   = cacheUtility;
     UserAPIClient  = userAPIClient;
     BaseURLOptions = baseURLoptions.Value;
     ServiceToServiceAuthOptions = serviceToServiceAuthOptions.Value;
 }
Example #4
0
 public JsonUtility(int?cacheTimeSeconds = null)
 {
     this.CacheTimeSeconds = cacheTimeSeconds;
     if (!cacheTimeSeconds.HasValue || cacheTimeSeconds.Value == 0)
     {
         this.CacheUtility = new NoCacheUtility();
     }
     else
     {
         this.CacheUtility = new AzureUtility(AzureContainerName);
     }
 }
Example #5
0
        public JsonUtility(int?cacheTimeSeconds = null, JsonSourceType sourceType = JsonSourceType.Unauthenticated)
        {
            this.CacheTimeSeconds = cacheTimeSeconds;
            if (!cacheTimeSeconds.HasValue || cacheTimeSeconds.Value == 0)
            {
                this.CacheUtility = new NoCacheUtility();
            }
            else
            {
                //this.CacheUtility = new AzureUtility(AzureContainerName);
                this.CacheUtility = new LocalCacheUtility(LocalCachePath);
            }

            this.WebClient = this.CreateWebClient(sourceType);
        }
Example #6
0
 public PalBot(IPacketTemplate packetTemplate, IPluginManager pluginManager, ICacheUtility cacheUtility) : base(pluginManager)
 {
     this.packetTemplate = packetTemplate;
     this.cacheUtility   = cacheUtility;
 }
Example #7
0
 protected IProvider Create(ICacheUtility cacheUtility)
 {
     ShapeFile.SpatialIndexCreationOption = SpatialIndexCreationOption;
     return(new ShapeFile(Filename, UseFilebasedIndex, cacheUtility, UseMemoryCache));
 }
 protected IProvider Create(ICacheUtility cacheUtility)
 {
     ShapeFile.SpatialIndexCreationOption = SpatialIndexCreationOption;
     return new ShapeFile(Filename, UseFilebasedIndex, cacheUtility, UseMemoryCache);
 }