Open this page in the API Guide

ICodeLibraryService.GenerateCodeLibrary Method

Generates a code library.

Namespace:  Dundas.BI.Entities.CodeLibraries
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (25.1.0.1000)
Syntax
CodeLibrary GenerateCodeLibrary(
	string name,
	Guid parentId,
	ContentType contentType
)

Parameters

name
Type: System.String
The name.
parentId
Type: System.Guid
The parent identifier.
contentType
Type: Dundas.BI.Entities.CodeLibraries.ContentType
Type of the content.

Return Value

Type: CodeLibrary
The newly created CodeLibrary.
Exceptions
ExceptionCondition
ArgumentException

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

-or-

parentId is Empty.

ArgumentOutOfRangeExceptioncontentType is not one of the ContentType values.
InvalidOperationExceptionThe entity has already been saved at least once.
NotFoundExceptionThe specified parent does not exist.
DuplicateItemExceptionAn item with the same name already exists in the specified location.
QuotaExceededExceptionGenerating the code library would cause the entity quota for code libraries or one of the underlying entity types to be exceeded.
NoPrivilegeException

The caller does not have access to overwrite or save to the specified location.

-or-

The entity being saved requires at least Developer privilege.

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