Open this page in the API Guide

IResourceFileService.Create Method

Creates the resource file by specified resource object type.

Namespace:  Dundas.BI.FileSystem
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (25.1.0.1000)
Syntax
File Create(
	ObjectType objectType,
	string name,
	Guid parentId,
	Stream data,
	EntryCreationOptions? options
)

Parameters

objectType
Type: Dundas.BI.ObjectType
Type of the resource object.
name
Type: System.String
The resource name.
parentId
Type: System.Guid
ID of the parent entry.
data
Type: System.IO.Stream
The data stream.
options
Type: Dundas.BI.FileSystem.EntryCreationOptions
Options for saving the new resource; or null to use the default options.

Return Value

Type: File
The created resource file.
Exceptions
ExceptionCondition
ArgumentException

objectType is not a resource type.

-or-

name is null, empty, only consists of whitespace, or contains invalid characters.

-or-

parentId is Empty.

ArgumentNullExceptiondata is null.
ArgumentOutOfRangeExceptionname is longer than MaxNameLength.
NotFoundExceptionThe entry specified by parentId does not exist.
DuplicateItemExceptionA file or folder with the specified name already exists in the parent folder.
InvalidOperationExceptionThe size of the data exceeds the limit set by the MaxResourceFileSize configuration setting.
NoPrivilegeException

The caller does not have permission to create entries in the specified parent.

-or-

The caller's seat kind is less privileged than PowerUser.

InvalidSessionExceptionThe caller context is not associated with a valid session.
See Also