New to Telerik Reporting? Download free 30-day trial

CustomDefinitionStorage Does Not Implement Interface Member

Environment

Product Version 16.1.22.511+
Product Progress® Telerik® Reporting
Report Designer Web Report Designer

Description

Errors like 'CustomDefinitionStorage' does not implement interface member 'IAssetsStorage.CreateFolderAsync(CreateFolderModel)' are thrown after upgrade to R2 2022.

Error Message

'CustomDefinitionStorage' does not implement interface member 'IAssetsStorage.CreateFolderAsync(CreateFolderModel)'
'CustomDefinitionStorage' does not implement interface member 'IAssetsStorage.DeleteAsync(string)'
...

Cause\Possible Cause(s)

In R2 2022, we improved the implementation of the IDefinitionStorage interface. Now the methods are asynchronous and you will need to replace the existing ones.

Solution

Implement the new interface methods:

public Task<ResourceFolderModel> CreateFolderAsync(CreateFolderModel model)
{
    // Creates a folder using the provided model.
    throw new NotImplementedException();
}

public Task<ResourceFolderModel> GetFolderAsync(string uri)
{
    // Retrieves the existing folder model by the provided URI.
    throw new NotImplementedException();
}

public Task DeleteFolderAsync(string uri)
{
    // Deletes a folder by the provided URI.
    throw new NotImplementedException();
}

public Task<IEnumerable<ResourceModelBase>> GetFolderContentsAsync(string uri)
{
    // Gets all resources contained in the given URI.
    throw new NotImplementedException();
}

public Task<ResourceFolderModel> RenameFolderAsync(RenameFolderModel model)
{
    // Renames a folder located at model.OldUri.
    throw new NotImplementedException();
}

public Task<byte[]> GetAsync(string resourceName)
{
    // Finds a resource by its name and returns its contents as byte array.
    throw new NotImplementedException();
}

public Task DeleteAsync(string uri)
{
    // Deletes the given resource
    throw new NotImplementedException();
}

public Task<ResourceFileModel> GetModelAsync(string uri)
{
    // Returns the resource model at provider URI or null if not found.
    throw new NotImplementedException();
}

public Task<ResourceFileModel> RenameAsync(RenameResourceModel model)
{
    // Renames the given resource
    throw new NotImplementedException();
}

public Task<ResourceFileModel> SaveAsync(SaveResourceModel model, byte[] resource)
{
    // Saves the raw data of a resource and returns its model.
    throw new NotImplementedException();
}

See Also

How to implement a report definition storage.

In this article