A Sandcastle Documented Class Library

# 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 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    File Create(
    	ObjectType objectType,
    	string name,
    	Guid parentId,
    	Stream data,
    	EntryCreationOptions options
    )

    Function Create (
    	objectType As ObjectType,
    	name As String,
    	parentId As Guid,
    	data As Stream,
    	options As EntryCreationOptions
    ) As File

    File^ Create(
    	ObjectType objectType,
    	String^ name,
    	Guid parentId,
    	Stream^ data,
    	EntryCreationOptions^ options
    )

    abstract Create :
            objectType : ObjectType *
            name : string *
            parentId : Guid *
            data : Stream *
            options : EntryCreationOptions -> File

#### 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
  to use the default options.

#### Return Value

Type: File
The created resource file.
Exceptions

Exception | Condition
--- | ---
ArgumentException | objectType is not a resource type. -or- name is , empty, only consists of whitespace, or contains invalid characters. -or- parentId is Empty.
ArgumentNullException | data is .
ArgumentOutOfRangeException | name is longer than MaxNameLength.
NotFoundException | The entry specified by parentId does not exist.
DuplicateItemException | A file or folder with the specified name already exists in the parent folder.
InvalidOperationException | The 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.
InvalidSessionException | The caller context is not associated with a valid session.

See Also

#### Reference

IResourceFileService Interface
Dundas.BI.FileSystem Namespace