Class FileSharedDataSourceStorage
Represents a file-based definition storage to resolve SharedDataSource definitions from a local directory.
Inheritance
System.Object
FileSharedDataSourceStorage
Assembly: Telerik.WebReportDesigner.Services.dll
Syntax
public class FileSharedDataSourceStorage : FileDefinitionStorageBase, IHasBaseDir, ISharedDataSourceStorage, IResourceStorage, IAssetsStorage
Constructors
Declaration
public FileSharedDataSourceStorage(string baseDir)
Parameters
System.String
baseDir
The base directory where the SharedDataSource definitions are stored.
|
Declaration
public FileSharedDataSourceStorage(string baseDir, string[] definitionFolders)
Parameters
System.String
baseDir
The base directory where the SharedDataSource subfolders are stored.
|
System.String[]
definitionFolders
The folders where the SharedDataSource definitions are stored. Pass an empty string array to include all the folders.
|
Declaration
public FileSharedDataSourceStorage(string baseDir, string[] definitionFolders, string[] excludedFolders)
Parameters
System.String
baseDir
The base directory where the SharedDataSource definitions are stored.
|
System.String[]
definitionFolders
The folders where the SharedDataSource definitions are stored. Pass an empty string array to include all the folders.
|
System.String[]
excludedFolders
Relative folder paths to be excluded when retrieving folder contents. Wildcards are not supported.
|
Properties
Gets an array with allowed file extensions.
Declaration
protected override string[] FileExtensions { get; }
Property Value
Overrides
Methods
Finds a SharedDataSource resource by its uri and returns the information about it.
Declaration
public override Task<ResourceFileModel> GetModelAsync(string uri)
Parameters
System.String
uri
The unique resource identifier (URI)
|
Returns
Overrides
Implements
Determines if an asset extension is valid.
Declaration
protected override bool IsExtensionValid(string resourceExtension)
Parameters
System.String
resourceExtension
|
Returns
Overrides
Declaration
public override ResourceFileModel Move(MoveResourceModel model)
Parameters
Returns
Overrides
Implements
Overwrites existing SharedDataSource.
Declaration
public override ResourceFileModel Overwrite(OverwriteResourceModel model, byte[] resource)
Parameters
Returns
Overrides
Implements
Renames a definition asset.
Declaration
public override Task<ResourceFileModel> RenameAsync(RenameResourceModel model)
Parameters
Returns
Overrides
Implements
Saves the new bytes of a SharedDataSource resource and returns the information about it.
The path to the SharedDataSource resource will be created if it does not exists.
Declaration
public override Task<ResourceFileModel> SaveAsync(SaveResourceModel model, byte[] resource)
Parameters
SaveResourceModel
model
The model containing the save operation data
|
System.Byte[]
resource
The contents of the resource.
|
Returns
Overrides
Implements
Exceptions
Validates the provided definitionId.
Declaration
protected override void ValidateDefinitionId(string definitionId)
Parameters
System.String
definitionId
|
Overrides
Explicit Interface Implementations
Returns the SharedDataSource model at uri
or null if not found.
Declaration
Task<SharedDataSourceModel> ISharedDataSourceStorage.GetModelAsync(string uri)
Parameters
System.String
uri
The unique resource identifier (URI) of the resource.
|
Returns
Implements
Renames a SharedDataSource by its model
.
Declaration
Task<SharedDataSourceModel> ISharedDataSourceStorage.RenameAsync(RenameResourceModel model)
Parameters
Returns
Implements
Creates new or overwrites an existing SharedDataSource definition file with the provided definition bytes.
Declaration
Task<SharedDataSourceModel> ISharedDataSourceStorage.SaveAsync(SaveResourceModel model, byte[] resource)
Parameters
Returns
Implements