• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IStorageProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: LocalBlobClient

        public LocalBlobClient(IStorageProvider storageProvider, IPathCreator pathCreator)
        {
            if (storageProvider == null) throw new ArgumentNullException("storageProvider");
            if (pathCreator == null) throw new ArgumentNullException("pathCreator");

            _storageProvider = storageProvider;
            _pathCreator = pathCreator;
        }
开发者ID:ronnieoverby,项目名称:BlobServer,代码行数:8,代码来源:LocalBlobClient.cs


示例17: PrettyGalleryService

        public PrettyGalleryService(IMediaService mediaService, IStorageProvider storageProvider, IOrchardServices orchardServices)
        {
            _mediaService = mediaService;
            _storageProvider = storageProvider;
            _orchardServices = orchardServices;

            T = NullLocalizer.Instance;
        }
开发者ID:richinoz,项目名称:Orchard1.6,代码行数:8,代码来源:PrettyGalleryService.cs


示例18: Init

        private void Init(string connectionString, CloudProvider provider)
        {
            var catalog = new DirectoryCatalog(".");
            var container = new CompositionContainer(catalog);
            container.ComposeExportedValue<string>(connectionString);
            _provider = container.GetExportedValue<IStorageProvider>(provider.ToString());

        }
开发者ID:roadan,项目名称:Clouds.NET,代码行数:8,代码来源:StorageClient.cs


示例19: Update

 /// <summary>
 /// Updates the collection of TVShows.
 /// </summary>
 /// <param name="shows">
 /// The collection of shows to update.
 /// </param>
 /// <param name="storageProvider">
 /// The storage provider to use
 /// </param>
 /// <param name="dataProvider">
 /// The data provider to use.
 /// </param>
 internal static void Update(
     this IList<TvShow> shows, IStorageProvider storageProvider, IDataProvider dataProvider)
 {
     foreach (var show in dataProvider.UpdateShows(shows, storageProvider))
     {
         show.LockIfNoEpisodes(storageProvider);
         show.Save(storageProvider);
     }
 }
开发者ID:nicolaspierre1990,项目名称:tvsorter,代码行数:21,代码来源:EnumerableExtensions.cs


示例20: LockFileCleaner

 public LockFileCleaner(
     IScheduledTaskManager scheduledTaskManager,
     IClock clock,
     IStorageProvider storageProvider)
 {
     _scheduledTaskManager = scheduledTaskManager;
     _clock = clock;
     _storageProvider = storageProvider;
 }
开发者ID:kanujhun,项目名称:myblog,代码行数:9,代码来源:LockFileCleaner.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IStorageProviderSession类代码示例发布时间:2022-05-24
下一篇:
C# IStorageFile类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap