示例#1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="configString">The Redis configuration string used to connect to the Redis server.</param>
 /// <param name="keyPrefix">The string used to prefix all keys used.</param>
 public LockRedisProvider(string configString, string keyPrefix)
 {
     Redis     = ConnectionMultiplexer.Connect(configString);
     KeyPrefix = keyPrefix;
     Id        = Guid.NewGuid();
     DisposableTracker.AddObject(this);
 }
 public FileStream(string filePath, FileMode mode, FileAccess Access = FileAccess.ReadWrite)
 {
     FilePath = filePath;
     Closed   = false;
     Mode     = mode;
     Stream   = new System.IO.FileStream(filePath, Mode, Access);
     DisposableTracker.AddObject(this);
 }
 public SharedCacheObjectRedisDataProvider()
 {
     DisposableTracker.AddObject(this);
 }
        // IMPLEMENTATION
        // IMPLEMENTATION
        // IMPLEMENTATION

        protected LogRecordDataProvider()
        {
            DisposableTracker.AddObject(this);
        }
 public StaticObjectMultiRedisDataProvider()
 {
     DisposableTracker.AddObject(this);
 }
示例#6
0
 public SingleLockObject(string key)
 {
     this.Key = key;
     DisposableTracker.AddObject(this);
 }
示例#7
0
        // Implementation

        public LockSingleProvider()
        {
            DisposableTracker.AddObject(this);
        }
示例#8
0
 public MultiLockObject(string key)
 {
     Db  = Redis.GetDatabase();
     Key = KeyPrefix + key;
     DisposableTracker.AddObject(this);
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="durationSeconds">The number of minutes a cached object is retained. 0 means forever, -1 means don't cache at all.</param>
 public StaticSmallObjectLocalDataProvider(int durationSeconds)
 {
     DisposableTracker.AddObject(this);
     DurationSeconds = durationSeconds;
 }
        // IMPLEMENTATION
        // IMPLEMENTATION
        // IMPLEMENTATION

        public ScriptDataProvider()
        {
            DisposableTracker.AddObject(this);
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 public StaticSmallObjectLocalDataProvider()
 {
     DisposableTracker.AddObject(this);
     DurationSeconds = WebConfigHelper.GetValue <int>(AreaRegistration.CurrentPackage.AreaName, "SmallObjectCacheDuration", YetaWFManager.Deployed ? 0 : -1);
 }
示例#12
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="configString">The Redis configuration string used to connect to the Redis server.</param>
 /// <param name="keyPrefix">The string used to prefix all channel names used.</param>
 public PubSubRedisProvider(string configString, string keyPrefix)
 {
     Redis     = ConnectionMultiplexer.Connect(configString);
     KeyPrefix = keyPrefix;
     DisposableTracker.AddObject(this);
 }
示例#13
0
 public StaticObjectSingleDataProvider()
 {
     DisposableTracker.AddObject(this);
 }
示例#14
0
 public MultiLockObject(string key)
 {
     Key      = key;
     LockFile = Path.Combine(RootFolder, "__LOCK__" + key);
     DisposableTracker.AddObject(this);
 }
示例#15
0
        // Implementation

        public LockFileProvider(string rootFolder)
        {
            RootFolder = rootFolder;
            DisposableTracker.AddObject(this);
        }