skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • MCP Servers
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    MCP Servers

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Use Reports in Applications
    • System Requirements
    • Forums
    • Videos
    • Blogs
    • Submit a Ticket
    • FAQs
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now
Search all

Class ResourceStorageBase

Provides base functionality for managing resource storage with default folder creation capabilities.

Inheritance
System.Object
ResourceStorageBase
ResourceStorage
Namespace: Telerik.WebReportDesigner.Services
Assembly: Telerik.WebReportDesigner.Services.dll

Syntax

public abstract class ResourceStorageBase
Remarks

Derived classes should implement specific storage mechanisms while inheriting default folder management and security features.

Constructors

ResourceStorageBase(CreateFolderModel[])

Initializes a new instance of the ResourceStorageBase class with the specified default folders.

Declaration
public ResourceStorageBase(CreateFolderModel[] defaultFolders)
Parameters
CreateFolderModel[] defaultFolders

The array of folder models that will be created during initialization.

Remarks

The provided folders will be created automatically when the storage is initialized.

Fields

defaultFolders

Gets the predefined set of default folders that are created during resource storage initialization.

Declaration
protected static readonly CreateFolderModel[] defaultFolders
Field Value
CreateFolderModel[]

Remarks

Contains Data, Images, and Styles folders that are automatically created to organize different types of report resources.

DefaultFoldersToCreate

Gets the collection of default folders that will be created during storage initialization.

Declaration
protected readonly CreateFolderModel[] DefaultFoldersToCreate
Field Value
CreateFolderModel[]

Remarks

This property is set during construction and determines which folders are automatically created.

Methods

CreateDefaultFolder(CreateFolderModel)

Creates a default folder using the specified folder model in the derived storage implementation.

Declaration
protected abstract void CreateDefaultFolder(CreateFolderModel model)
Parameters
CreateFolderModel model

The folder model containing the name and parent URI for the folder to create.

Remarks

This abstract method must be implemented by derived classes to handle the actual folder creation logic for their specific storage mechanism.

EnsureDefaultFolders()

Creates the default folders by iterating through the configured folder collection in the correct order.

Declaration
protected virtual void EnsureDefaultFolders()
Remarks

Logs folder creation attempts and silently ignores ResourceFolderAlreadyExistsException to handle cases where folders already exist.

GetOrderedDefaultFoldersToCreate()

Gets the default folders ordered to ensure parent folders are created before child folders.

Declaration
protected virtual IEnumerable<CreateFolderModel> GetOrderedDefaultFoldersToCreate()
Returns
System.Collections.Generic.IEnumerable<CreateFolderModel>

An enumerable collection of CreateFolderModel objects sorted by ParentUri to maintain proper creation hierarchy.

Remarks

Orders folders by ParentUri to guarantee that parent directories exist before attempting to create nested folders.

IsExtensionValid(String)

Determines whether the specified file extension is valid for resource uploads.

Declaration
protected virtual bool IsExtensionValid(string resourceExtension)
Parameters
System.String resourceExtension

The file extension to validate (without the leading dot).

Returns
System.Boolean

True if the extension is valid; otherwise, false.

Remarks

The base implementation returns true for all extensions, allowing derived classes to override with custom validation logic.

ValidateSavedResourceExtension(String)

Validates that the specified resource name has an allowed file extension for security purposes.

Declaration
protected void ValidateSavedResourceExtension(string resourceName)
Parameters
System.String resourceName

The name of the resource file including its extension to validate.

Remarks

Checks both the ForbiddenFileExtensions list and calls IsExtensionValid to ensure comprehensive validation.

Exceptions
InvalidResourceNameException

Thrown when the file extension is forbidden or invalid.

Getting Started
  • Install Now
  • Online Demos
Support Resources
  • Documentation
  • Knowledge Base
  • Videos
  • Reporting Samples Repository
  • Reporting Release History
Community
  • Forums
  • Blogs
  • Reporting Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.