当前位置: 首页>>代码示例>>C#>>正文


C# IStorageProvider类代码示例

本文整理汇总了C#中IStorageProvider的典型用法代码示例。如果您正苦于以下问题:C# IStorageProvider类的具体用法?C# IStorageProvider怎么用?C# IStorageProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IStorageProvider类属于命名空间,在下文中一共展示了IStorageProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LockFileCleaner

 public LockFileCleaner(
     IClock clock,
     IStorageProvider storageProvider)
 {
     _clock = clock;
     _storageProvider = storageProvider;
 }
开发者ID:hqmirror,项目名称:Piedone.HelpfulLibraries,代码行数:7,代码来源:LockFileCleaner.cs

示例2: ImportController

 public ImportController()
 {
     inputConfigProvider = ObjectFactory.GetProvider<IInputConfigProvider>();
     scriptProvider = ObjectFactory.GetProvider<IScriptProvider>();
     appConfigProvider = ObjectFactory.GetProvider<IAppConfigProvider>();
     storageProvider = ObjectFactory.GetProvider<IStorageProvider>();
 }
开发者ID:samiy-xx,项目名称:keysndr,代码行数:7,代码来源:ImportController.cs

示例3: LoadAsync

 /// <summary>
 /// Loads the provider into the system.
 /// </summary>
 /// <param name="provider">The provider to add to the list.</param>
 public async Task LoadAsync(IStorageProvider provider)
 {
     if (provider == null)
         throw new NullReferenceException(ExceptionMessage.IsNullOrInvalid("provider"));
     await provider.LoadInfoAsync();
     _providers.Add(provider);            
 }
开发者ID:eliberis,项目名称:Diminuendo,代码行数:11,代码来源:DManager.cs

示例4: ThumbnailsService

        public ThumbnailsService(ShellSettings settings, IWorkContextAccessor wca, ICacheManager cacheManager, IMediaService mediaService, ISignals signals, IStorageProvider storageProvider)
        {
            _wca = wca;
            _cacheManager = cacheManager;
            _mediaService = mediaService;
            _signals = signals;
            _storageProvider = storageProvider;
            var appPath = "";
            if (HostingEnvironment.IsHosted)
            {
                appPath = HostingEnvironment.ApplicationVirtualPath;
            }
            if (!appPath.EndsWith("/"))
                appPath = appPath + '/';
            if (!appPath.StartsWith("/"))
                appPath = '/' + appPath;

            _publicPath = appPath + "Media/" + settings.Name + "/";

            var physPath = ThumbnailsCacheMediaPath.Replace('/', Path.DirectorySeparatorChar);
            var parent = Path.GetDirectoryName(physPath);
            var folder = Path.GetFileName(physPath);
            if (_mediaService.GetMediaFolders(parent).All(f => f.Name != folder))
            {
                _mediaService.CreateFolder(parent, folder);
            }
        }
开发者ID:pnmcosta,项目名称:orchardcontribthumbnails,代码行数:27,代码来源:ThumbnailsService.cs

示例5: PdfOutputController

 public PdfOutputController(IHtmlGenerator htmlGenerator, IPdfGenerator pdfGenerator, IStorageProvider storageProvider, IFilenameGenerator filenameGenerator)
 {
     this.htmlGenerator = htmlGenerator;
     this.pdfGenerator = pdfGenerator;
     this.storageProvider = storageProvider;
     this.filenameGenerator = filenameGenerator;
 }
开发者ID:volkanx,项目名称:domchk53,代码行数:7,代码来源:PdfOutputController.cs

示例6: MediaService

        /// <summary>
        /// Initializes a new instance of the MediaService class with a given IStorageProvider and IOrchardServices.
        /// </summary>
        /// <param name="storageProvider">The storage provider.</param>
        /// <param name="orchardServices">The orchard services provider.</param>
        public MediaService(IStorageProvider storageProvider, IOrchardServices orchardServices)
        {
            _storageProvider = storageProvider;
            _orchardServices = orchardServices;

            T = NullLocalizer.Instance;
        }
开发者ID:monkieboy,项目名称:Euler,代码行数:12,代码来源:MediaService.cs

示例7: RecipeJournalManager

        public RecipeJournalManager(IStorageProvider storageProvider)
        {
            _storageProvider = storageProvider;

            Logger = NullLogger.Instance;
            T = NullLocalizer.Instance;
        }
开发者ID:stack72,项目名称:GiveCamp-London,代码行数:7,代码来源:RecipeJournalManager.cs

示例8: GameViewModel

        public GameViewModel(int totalQuestions, IImageProvider imageProvider, IStorageProvider storageProvider)
        {
            _imageProvider = imageProvider;
            _storageProvider = storageProvider;

            // register all the events
            CommandEvents.ContinueButtonPressed += new EventHandler(ContinueButtonPressed);
            CommandEvents.AnswerButtonPressed += new EventHandler(AnswerButtonPressed);
            CommandEvents.HighScoreContinueButtonPressed += new EventHandler(HighScoreContinueButtonPressed);
            DisplayHighScore += new EventHandler(DisplayScore);

            // check to see whether any game state is already loaded
            if (_storageProvider.GameStateExists())
            {
                _game = _storageProvider.LoadGameState();

                // check if the player was in the middle of a question
                if (_game.CurrentQuestion.Answered)
                {
                    DisplayQuestion();
                    ContinueButtonPressed(this, new EventArgs());
                }
                else
                {
                    DisplayQuestion();
                }
            }
            else
            {
                _game = new Game(totalQuestions);
                ContinueButtonPressed(this, new EventArgs());
            }
        }
开发者ID:simonguest,项目名称:wp7-flagmatch,代码行数:33,代码来源:GameViewModel.cs

示例9: ScanManager

 /// <summary>
 /// Initializes a new instance of the <see cref="ScanManager"/> class.
 /// </summary>
 /// <param name="storageProvider">
 /// The storage provider to use.
 /// </param>
 /// <param name="dataProvider">
 /// The data provider to use. 
 /// </param>
 internal ScanManager(IStorageProvider storageProvider, IDataProvider dataProvider)
 {
     this.storageProvider = storageProvider;
     this.dataProvider = dataProvider;
     this.settings = Settings.LoadSettings(storageProvider);
     this.tvShows = TvShow.GetTvShows(storageProvider).ToList();
 }
开发者ID:a-jackson,项目名称:tvsorter,代码行数:16,代码来源:ScanManager.cs

示例10: MainViewModel

        public MainViewModel(IStorageProvider storageProvider)
        {
            _storageProvider = storageProvider;

            _storageProvider.DeleteGameState();
            UpdateGameButtonVisibility(this,null);
        }
开发者ID:simonguest,项目名称:wp7-flagmatch,代码行数:7,代码来源:MainViewModel.cs

示例11: ImageDisOptions

        public ImageDisOptions(
            IStorageProvider storageProvider,
            IImageTransformProvider imageTransformProvider, 
            string path = null,
            ImageType[] allowedImageTypes = null,
            IKeyGenerator keyGenerator = null)
        {
            if (storageProvider == null)
                throw new ArgumentNullException("storageProvider");

            StorageProvider = storageProvider;

            if (imageTransformProvider == null)
                throw new ArgumentNullException("imageTransformProvider");

            ImageTransformProvider = imageTransformProvider;

            Path = string.IsNullOrWhiteSpace(path) ? "/imagedis" : path;

            AllowedImageTypes = allowedImageTypes == null || !allowedImageTypes.Any() 
                ? new[] { ImageTypes.Jpeg, ImageTypes.Png } 
                : allowedImageTypes;

            KeyGenerator = keyGenerator ?? new RandomKeyGenerator();
        }
开发者ID:lupcob,项目名称:imagedis,代码行数:25,代码来源:ImageDisOptions.cs

示例12: KeeAnywhereWebRequest

        public KeeAnywhereWebRequest(IStorageProvider provider, string itemPath)
        {
            if (provider == null) throw new ArgumentNullException("provider");
            if (itemPath == null) throw new ArgumentNullException("itemPath");

            _provider = provider;
            _itemPath = itemPath;
        }
开发者ID:Kyrodan,项目名称:KeeAnywhere,代码行数:8,代码来源:KeeAnywhereWebRequest.cs

示例13: OnStorageActivate

 internal static void OnStorageActivate(IStorageProvider storage, string grainType, GrainReference grain, TimeSpan latency)
 {
     StorageActivateTotal.Increment();
     if (latency > TimeSpan.Zero)
     {
         StorageReadLatency.AddSample(latency);
     }
 }
开发者ID:stanroze,项目名称:orleans,代码行数:8,代码来源:StorageStatisticsGroup.cs

示例14: Setup

        public void Setup()
        {
            scriptProviderMock = new Mock<IScriptProvider>();
            scriptProvider = scriptProviderMock.Object;

            storageProviderMock = new Mock<IStorageProvider>();
            storageProvider = storageProviderMock.Object;
        }
开发者ID:samiy-xx,项目名称:keysndr,代码行数:8,代码来源:SaveSource_Tests.cs

示例15: Label

 public Label(IDateProvider dateProvider,
              IIdentityProvider identitiyProvider,
              IStorageProvider storageProvider)
 {
     DateProvider     = dateProvider;
     IdentityProvider = identitiyProvider;
     StorageProvider  = storageProvider;
 }
开发者ID:netxph,项目名称:cards-tfs,代码行数:8,代码来源:Label.cs


注:本文中的IStorageProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。