本文整理汇总了C#中IStorageProvider类的典型用法代码示例。如果您正苦于以下问题:C# IStorageProvider类的具体用法?C# IStorageProvider怎么用?C# IStorageProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IStorageProvider类属于命名空间,在下文中一共展示了IStorageProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LockFileCleaner
public LockFileCleaner(
IClock clock,
IStorageProvider storageProvider)
{
_clock = clock;
_storageProvider = storageProvider;
}
示例2: ImportController
public ImportController()
{
inputConfigProvider = ObjectFactory.GetProvider<IInputConfigProvider>();
scriptProvider = ObjectFactory.GetProvider<IScriptProvider>();
appConfigProvider = ObjectFactory.GetProvider<IAppConfigProvider>();
storageProvider = ObjectFactory.GetProvider<IStorageProvider>();
}
示例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);
}
示例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);
}
}
示例5: PdfOutputController
public PdfOutputController(IHtmlGenerator htmlGenerator, IPdfGenerator pdfGenerator, IStorageProvider storageProvider, IFilenameGenerator filenameGenerator)
{
this.htmlGenerator = htmlGenerator;
this.pdfGenerator = pdfGenerator;
this.storageProvider = storageProvider;
this.filenameGenerator = filenameGenerator;
}
示例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;
}
示例7: RecipeJournalManager
public RecipeJournalManager(IStorageProvider storageProvider)
{
_storageProvider = storageProvider;
Logger = NullLogger.Instance;
T = NullLocalizer.Instance;
}
示例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());
}
}
示例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();
}
示例10: MainViewModel
public MainViewModel(IStorageProvider storageProvider)
{
_storageProvider = storageProvider;
_storageProvider.DeleteGameState();
UpdateGameButtonVisibility(this,null);
}
示例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();
}
示例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;
}
示例13: OnStorageActivate
internal static void OnStorageActivate(IStorageProvider storage, string grainType, GrainReference grain, TimeSpan latency)
{
StorageActivateTotal.Increment();
if (latency > TimeSpan.Zero)
{
StorageReadLatency.AddSample(latency);
}
}
示例14: Setup
public void Setup()
{
scriptProviderMock = new Mock<IScriptProvider>();
scriptProvider = scriptProviderMock.Object;
storageProviderMock = new Mock<IStorageProvider>();
storageProvider = storageProviderMock.Object;
}
示例15: Label
public Label(IDateProvider dateProvider,
IIdentityProvider identitiyProvider,
IStorageProvider storageProvider)
{
DateProvider = dateProvider;
IdentityProvider = identitiyProvider;
StorageProvider = storageProvider;
}