skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • 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

    AI Coding Assistants

    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 FileDefinitionStorageBase

Represents a base class for file-based definition storages.

Inheritance
System.Object
ResourceStorageBase
ResourceStorage
FileDefinitionStorageBase
FileDefinitionStorage
FileSharedDataSourceStorage
Inherited Members
ResourceStorage.RootFolderName
ResourceStorage.GetOrderedDefaultFoldersToCreate()
ResourceStorage.GetAllByExtension(String[])
ResourceStorage.GetFolderContentsAsync(String)
ResourceStorage.FolderHasContents(String)
ResourceStorage.GetFolderByName(String)
ResourceStorage.CreateFolderAsync(CreateFolderModel)
ResourceStorage.MoveFolder(MoveFolderModel)
ResourceStorage.RenameFolderAsync(RenameFolderModel)
ResourceStorage.DeleteFolderAsync(String)
ResourceStorage.FolderNameExists(String)
ResourceStorage.FolderExists(String)
ResourceStorage.GetAsync(String)
ResourceStorage.GetByUri(String)
ResourceStorage.ResourceNameExists(String)
ResourceStorage.ResourceExists(String)
ResourceStorage.GetFile(String)
ResourceStorage.GetModelByName(String)
ResourceStorage.GetModelCore<T>(String)
ResourceStorage.Save(String, Byte[])
ResourceStorage.SaveAsync(SaveResourceModel, Byte[])
ResourceStorage.SaveAsync(SaveResourceModel, Byte[], Boolean)
ResourceStorage.SaveCore<T>(SaveResourceModel, Byte[], Boolean)
ResourceStorage.Overwrite(OverwriteResourceModel, Byte[])
ResourceStorage.OverwriteCore<T>(OverwriteResourceModel, Byte[])
ResourceStorage.RenameAsync(RenameResourceModel)
ResourceStorage.RenameCore<T>(RenameResourceModel)
ResourceStorage.Move(MoveResourceModel)
ResourceStorage.MoveCore<T>(MoveResourceModel)
ResourceStorage.Search(SearchResourcesModel)
ResourceStorage.CreateDirectory(String[])
ResourceStorage.EnsureDefaultFolders()
ResourceStorage.CreateDefaultFolder(CreateFolderModel)
ResourceStorage.BaseDir
ResourceStorageBase.defaultFolders
ResourceStorageBase.DefaultFoldersToCreate
ResourceStorageBase.ValidateSavedResourceExtension(String)
ResourceStorageBase.IsExtensionValid(String)
Namespace: Telerik.WebReportDesigner.Services
Assembly: Telerik.WebReportDesigner.Services.dll

Syntax

public abstract class FileDefinitionStorageBase : ResourceStorage, IResourceStorage, IAssetsStorage, IHasBaseDir

Constructors

FileDefinitionStorageBase(String, String[])

Creates an instance of FileDefinitionStorageBase class.

Declaration
public FileDefinitionStorageBase(string baseDir, string[] definitionFolders)
Parameters
System.String baseDir

System.String[] definitionFolders

FileDefinitionStorageBase(String, String[], String[])

Creates an instance of FileDefinitionStorageBase class.

Declaration
public FileDefinitionStorageBase(string baseDir, string[] definitionFolders, string[] excludedFolders)
Parameters
System.String baseDir

System.String[] definitionFolders

System.String[] excludedFolders

Properties

FileExtensions

Gets an array with allowed file extensions.

Declaration
protected abstract string[] FileExtensions { get; }
Property Value
System.String[]

Methods

DeleteAsync(String)

Deletes a report by its uri.

Declaration
public override Task DeleteAsync(string uri)
Parameters
System.String uri

The unique resource identifier (URI) of the report.

Returns
System.Threading.Tasks.Task

Overrides
ResourceStorage.DeleteAsync(String)

GetByUri<TDefinitionNotFoundException>(String)

Returns the raw bytes from the given uri.

Declaration
protected virtual byte[] GetByUri<TDefinitionNotFoundException>(string uri)
    where TDefinitionNotFoundException : Exception
Parameters
System.String uri

Returns
System.Byte[]

Type Parameters
TDefinitionNotFoundException

GetFolderAsync(String)

Returns the folder model at uri or null if not found.

Declaration
public override Task<ResourceFolderModel> GetFolderAsync(string uri)
Parameters
System.String uri

Returns
System.Threading.Tasks.Task<ResourceFolderModel>

Overrides
ResourceStorage.GetFolderAsync(String)

GetFolderContents(String, String[])

Lists all definition resource files found in the given uri.

Declaration
public override IEnumerable<ResourceModelBase> GetFolderContents(string uri, string[] searchPattern)
Parameters
System.String uri

The unique resource identifier(URI) of the folder. null or empty string represents the root directory

System.String[] searchPattern

The file search patterns used when retrieving definition resources.

Returns
System.Collections.Generic.IEnumerable<ResourceModelBase>

A list of all files and subfolders found in the provided folder URI as an enumerable of ResourceModelBase

Overrides
ResourceStorage.GetFolderContents(String, String[])

GetModelAsync(String)

Returns the resource model at uri or null if not found.

Declaration
public override Task<ResourceFileModel> GetModelAsync(string uri)
Parameters
System.String uri

Returns
System.Threading.Tasks.Task<ResourceFileModel>

Overrides
ResourceStorage.GetModelAsync(String)

RenameAsync<TInvalidDefinitionNameException>(RenameResourceModel)

Renames a definition asset.

Declaration
protected virtual Task<ResourceFileModel> RenameAsync<TInvalidDefinitionNameException>(RenameResourceModel model)
    where TInvalidDefinitionNameException : Exception
Parameters
RenameResourceModel model

Returns
System.Threading.Tasks.Task<ResourceFileModel>

Type Parameters
TInvalidDefinitionNameException

Save(SaveResourceModel, Byte[], Boolean, Boolean)

Creates new or overwrites an existing Report- or SharedDataSource definition file with the provided definition bytes.

Declaration
public ResourceFileModel Save(SaveResourceModel model, byte[] resource, bool overwrite, bool forcePath)
Parameters
SaveResourceModel model

System.Byte[] resource

System.Boolean overwrite

System.Boolean forcePath

Returns
ResourceFileModel

SaveAsync<TDefinitionNotFoundException>(SaveResourceModel, Byte[])

Saves a definition asset.

Declaration
protected virtual Task<ResourceFileModel> SaveAsync<TDefinitionNotFoundException>(SaveResourceModel model, byte[] resource)
    where TDefinitionNotFoundException : Exception
Parameters
SaveResourceModel model

System.Byte[] resource

Returns
System.Threading.Tasks.Task<ResourceFileModel>

Type Parameters
TDefinitionNotFoundException

ValidateDefinitionId(String)

Validates the provided definitionId.

Declaration
protected abstract void ValidateDefinitionId(string definitionId)
Parameters
System.String definitionId

WrapException<TResult, TDefinitionException, TResourceException>(Func<TResult>)

Executes a callback and wraps the TResourceException in a TDefinitionException, if one occurs.

Declaration
protected TResult WrapException<TResult, TDefinitionException, TResourceException>(Func<TResult> callback)
    where TDefinitionException : Exception where TResourceException : Exception
Parameters
System.Func<TResult> callback

Returns
TResult

Type Parameters
TResult

TDefinitionException

TResourceException

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.