Пример #1
0
        /// <summary>
        /// Retrieves a provider satisfying the specified requirements.
        /// </summary>
        /// <param name="requirements">The requirements.</param>
        /// <returns>The StorageProvider instance.</returns>
        public StorageProvider GetProvider(StorageRequirements requirements)
        {
            var provider = providers.Find(s => s.MatchesRequirements(requirements));

            if (provider == null)
            {
                provider = new StorageProvider(titleName, requirements);
                providers.Add(provider);
            }

            return(provider);
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the StorageContainerSession class.
 /// </summary>
 /// <param name="provider">The associated storage provider.</param>
 /// <param name="container">The associated storage container.</param>
 internal StorageSession(StorageProvider provider, StorageContainer container)
 {
     this.Provider  = provider;
     this.container = container;
 }