/// <summary>
 /// Initialize a new instance of the <see cref="CacheManagerData"/> class.
 /// </summary>
 /// <param name="name">
 /// The name of the <see cref="IsolatedStorageCacheStorageData"/>.
 /// </param>
 /// <param name="storageEncryption">
 /// Storage Encryption data defined in configuration
 /// </param>
 /// <param name="partitionName">
 /// Name of the Isolated Storage area to use.
 /// </param>
 public IsolatedStorageCacheStorageData(string name, StorageEncryptionProviderData storageEncryption, string partitionName)
     : base(name, storageEncryption)
 {
     this.partitionName = partitionName;
 }
 /// <summary>
 /// Initialize a new instance of the <see cref="CacheManagerData"/> class.
 /// </summary>
 /// <param name="name">
 /// The name of the <see cref="CacheManagerData"/>.
 /// </param>
 /// <param name="typeName">
 /// Gets the type for the <see cref="CustomCacheStorageData"/>.
 /// </param>
 /// <param name="storageEncryption">
 /// Storage Encryption data defined in configuration
 /// </param>
 public CustomCacheStorageData(string name, string typeName, StorageEncryptionProviderData storageEncryption) : base(name, storageEncryption)
 {
     this.typeName   = typeName;
     this.extensions = new NameValueItemCollection();
 }
Example #3
0
 /// <summary>
 /// Initialize a new instance of the <see cref="CacheManagerData"/> class.
 /// </summary>
 /// <param name="name">
 /// The name of the <see cref="CacheManagerData"/>.
 /// </param>
 /// <param name="storageEncryption">
 /// Storage Encryption data defined in configuration
 /// </param>
 protected CacheStorageData(string name, StorageEncryptionProviderData storageEncryption) : base(name)
 {
     this.storageEncryption = storageEncryption;
 }
 /// <summary>
 /// Initialize a new instance of the <see cref="CacheManagerData"/> class.
 /// </summary>
 /// <param name="name">
 /// The name of the <see cref="CacheManagerData"/>.
 /// </param>
 /// <param name="typeName">
 /// Gets the type for the <see cref="CustomCacheStorageData"/>.
 /// </param>
 /// <param name="storageEncryption">
 /// Storage Encryption data defined in configuration
 /// </param>
 public CustomCacheStorageData(string name, string typeName, StorageEncryptionProviderData storageEncryption)
     : base(name, storageEncryption)
 {
     this.typeName = typeName;
     this.extensions = new NameValueItemCollection();
 }
        public void ThenReturnsNewlyConfiguredInstanceAfterReconfigureOfStorageEncryptionProvider()
        {
            MockStorageEncryptionProvider.Instantiated = false;

            storageEncryptionProviderData = new MockStorageEncryptionProviderData("Storage Encryption");
            cacheSettings.EncryptionProviders.Add(storageEncryptionProviderData);
            
            IsolatedStorageCacheStorageData isolatedStoreData = new IsolatedStorageCacheStorageData();
            isolatedStoreData.Name = "Isolated Storage";
            isolatedStoreData.PartitionName = "entlib";
            isolatedStoreData.StorageEncryption = storageEncryptionProviderData.Name;

            cacheSettings.BackingStores.Add(isolatedStoreData);
            
            cacheManagerData.CacheStorage = isolatedStoreData.Name;
            configurationSource.DoSourceChanged(new string[] { CacheManagerSettings.SectionName });

            CacheManagerFactory factory = new CacheManagerFactory(serviceLcoator);
            ICacheManager cacheManager = factory.Create(cacheSettings.DefaultCacheManager);
            Assert.IsTrue(MockStorageEncryptionProvider.Instantiated);
        }
 /// <summary>
 /// Adds a <see cref="StorageEncryptionProviderData"/> to the <see cref="CacheManagerSettings"/> as well as adds a reference to the <see cref="IBackingStore"/> instance currently being configured.
 /// </summary>
 /// <param name="storageEncyption">The <see cref="StorageEncryptionProviderData"/> that should be added to configuration.</param>
 protected void AddEncryptionProviderToCachingConfigurationAndBackingStore(StorageEncryptionProviderData storageEncyption)
 {
     contextExtension.CachingSettings.EncryptionProviders.Add(storageEncyption);
     contextExtension.CacheStorage.StorageEncryption = storageEncyption.Name;
 }
 /// <summary>
 /// Initialize a new instance of the <see cref="CacheManagerData"/> class.
 /// </summary>
 /// <param name="name">
 /// The name of the <see cref="IsolatedStorageCacheStorageData"/>.
 /// </param>
 /// <param name="storageEncryption">
 /// Storage Encryption data defined in configuration
 /// </param>
 /// <param name="partitionName">
 /// Name of the Isolated Storage area to use.
 /// </param>
 public IsolatedStorageCacheStorageData(string name, StorageEncryptionProviderData storageEncryption, string partitionName) : base(name, storageEncryption)
 {
     this.partitionName = partitionName;
 }
Example #8
0
 /// <summary>
 /// Initialize a new instance of the <see cref="CacheManagerData"/> class.
 /// </summary>
 /// <param name="name">
 /// The name of the <see cref="CacheManagerData"/>.
 /// </param>
 /// <param name="storageEncryption">
 /// Storage Encryption data defined in configuration
 /// </param>
 protected CacheStorageData(string name, StorageEncryptionProviderData storageEncryption)
     : base(name)
 {
     this.storageEncryption = storageEncryption;
 }