Defines the DataType Service, which is an easy access to operations involving IDataType
Namespace: Umbraco.Cms.Core.Services Assembly: Umbraco.Core.dll Syntaxpublic interface IDataTypeService : IService
Methods View Source Copy(IDataType, Int32) Declaration
virtual Attempt<OperationResult<MoveOperationStatusType, IDataType>> Copy(IDataType copying, int containerId)
Parameters Type Name Description IDataType copying System.Int32 containerId Returns View Source Copy(IDataType, Int32, Int32) Declaration
virtual Attempt<OperationResult<MoveOperationStatusType, IDataType>> Copy(IDataType copying, int containerId, int userId = -1)
Parameters Type Name Description IDataType copying System.Int32 containerId System.Int32 userId Returns View Source CopyAsync(IDataType, Nullable<Guid>, Guid)
Copies a IDataType to a given container
DeclarationTask<Attempt<IDataType, DataTypeOperationStatus>> CopyAsync(IDataType toCopy, Guid? containerKey, Guid userKey)
Parameters Type Name Description IDataType toCopy
The data type that will be copied
System.Nullable<Guid> containerKeyThe container key where the data type will be copied to.
Guid userKeyThe user that did the Copy action
Returns View Source CreateAsync(IDataType, Guid)Creates a new IDataType
DeclarationTask<Attempt<IDataType, DataTypeOperationStatus>> CreateAsync(IDataType dataType, Guid userKey)
Parameters Type Name Description IDataType dataType
IDataType to create
Guid userKeyKey of the user issuing the creation
Returns View Source CreateContainer(Int32, Guid, String, Int32) DeclarationAttempt<OperationResult<OperationResultType, EntityContainer>> CreateContainer(int parentId, Guid key, string name, int userId = -1)
Parameters Type Name Description System.Int32 parentId Guid key System.String name System.Int32 userId Returns View Source Delete(IDataType, Int32)
Deletes an IDataType
Declarationvoid Delete(IDataType dataType, int userId = -1)
Parameters Type Name Description IDataType dataType
IDataType to delete
System.Int32 userIdId of the user issuing the deletion
View Source DeleteAsync(Guid, Guid)Deletes an IDataType
DeclarationTask<Attempt<IDataType, DataTypeOperationStatus>> DeleteAsync(Guid id, Guid userKey)
Parameters Type Name Description Guid id
The guid Id of the IDataType to delete
Guid userKeyKey of the user issuing the deletion
Returns View Source DeleteContainer(Int32, Int32) DeclarationAttempt<OperationResult> DeleteContainer(int containerId, int userId = -1)
Parameters Type Name Description System.Int32 containerId System.Int32 userId Returns View Source FilterAsync(String, String, String, Int32, Int32)
Gets multiple IDataType objects by their unique keys.
DeclarationTask<PagedModel<IDataType>> FilterAsync(string name = null, string editorUiAlias = null, string editorAlias = null, int skip = 0, int take = 100)
Parameters Type Name Description System.String name
Name to filter by.
System.String editorUiAliasEditor ui alias to filter by.
System.String editorAliasEditor alias to filter by.
System.Int32 skipNumber of items to skip.
System.Int32 takeNumber of items to take.
Returns View Source GetAll(Int32[])Gets all IDataType objects or those with the ids passed in
DeclarationIEnumerable<IDataType> GetAll(params int[] ids)
Parameters Type Name Description System.Int32[] ids
Optional array of Ids
Returns View Source GetAllAsync(Guid[])Gets multiple IDataType objects by their unique keys.
DeclarationTask<IEnumerable<IDataType>> GetAllAsync(params Guid[] keys)
Parameters Type Name Description Guid[] keys
The keys to get datatypes by.
Returns Type Description Task<IEnumerable<IDataType>>An attempt with the requested data types.
View Source GetAsync(Guid)Gets an IDataType by its unique guid Id
DeclarationTask<IDataType> GetAsync(Guid id)
Parameters Type Name Description Guid id
Unique guid Id of the DataType
Returns View Source GetAsync(String)Gets an IDataType by its Name
DeclarationTask<IDataType> GetAsync(string name)
Parameters Type Name Description System.String name
Name of the IDataType
Returns View Source GetByEditorAlias(String)Gets a IDataType by its control Id
DeclarationIEnumerable<IDataType> GetByEditorAlias(string propertyEditorAlias)
Parameters Type Name Description System.String propertyEditorAlias
Alias of the property editor
Returns Type Description IEnumerable<IDataType>Collection of IDataType objects with a matching control id
View Source GetByEditorAliasAsync(String)Gets all IDataType for a given property editor
Declarationvirtual Task<IEnumerable<IDataType>> GetByEditorAliasAsync(string propertyEditorAlias)
Parameters Type Name Description System.String propertyEditorAlias
Alias of the property editor
Returns Type Description Task<IEnumerable<IDataType>>Collection of IDataType configured for the property editor
View Source GetByEditorAliasAsync(String[])Gets all IDataType for a set of property editors
Declarationvirtual Task<IEnumerable<IDataType>> GetByEditorAliasAsync(string[] propertyEditorAlias)
Parameters Type Name Description System.String[] propertyEditorAlias
Aliases of the property editors
Returns Type Description Task<IEnumerable<IDataType>>Collection of IDataType configured for the property editors
View Source GetByEditorUiAlias(String)Gets all IDataType for a given editor UI alias
DeclarationTask<IEnumerable<IDataType>> GetByEditorUiAlias(string editorUiAlias)
Parameters Type Name Description System.String editorUiAlias
The UI Alias to query by.
Returns Type Description Task<IEnumerable<IDataType>>Collection of IDataType which has the UI alias.
View Source GetContainer(Guid) DeclarationEntityContainer GetContainer(Guid containerId)
Parameters Type Name Description Guid containerId Returns View Source GetContainer(Int32) Declaration
EntityContainer GetContainer(int containerId)
Parameters Type Name Description System.Int32 containerId Returns View Source GetContainers(Int32[]) Declaration
IEnumerable<EntityContainer> GetContainers(int[] containerIds)
Parameters Type Name Description System.Int32[] containerIds Returns View Source GetContainers(String, Int32) Declaration
IEnumerable<EntityContainer> GetContainers(string folderName, int level)
Parameters Type Name Description System.String folderName System.Int32 level Returns View Source GetContainers(IDataType) Declaration
IEnumerable<EntityContainer> GetContainers(IDataType dataType)
Parameters Returns View Source GetDataType(Int32)
Gets a IDataType by its Id
DeclarationIDataType GetDataType(int id)
Parameters Type Name Description System.Int32 id
Id of the IDataType
Returns View Source GetDataType(String)Gets a IDataType by its Name
DeclarationIDataType GetDataType(string name)
Parameters Type Name Description System.String name
Name of the IDataType
Returns View Source GetListViewReferences(Int32) Declarationvirtual IReadOnlyDictionary<Udi, IEnumerable<string>> GetListViewReferences(int id)
Parameters Type Name Description System.Int32 id Returns Type Description IReadOnlyDictionary<Udi, IEnumerable<System.String>> View Source GetPagedRelationsAsync(Guid, Int32, Int32)
Gets a paged result of items which are in relation with the current data type.
Declarationvirtual Task<PagedModel<RelationItemModel>> GetPagedRelationsAsync(Guid key, int skip, int take)
Parameters Type Name Description Guid key
The identifier of the data type to retrieve relations for.
System.Int32 skipThe amount of items to skip
System.Int32 takeThe amount of items to take.
Returns View Source GetReferences(Int32)Returns a dictionary of content type Udis and the property type aliases that use a IDataType
DeclarationIReadOnlyDictionary<Udi, IEnumerable<string>> GetReferences(int id)
Parameters Type Name Description System.Int32 id Returns Type Description IReadOnlyDictionary<Udi, IEnumerable<System.String>> View Source GetReferencesAsync(Guid)
Returns a dictionary of content type Udis and the property type aliases that use a IDataType
DeclarationTask<Attempt<IReadOnlyDictionary<Udi, IEnumerable<string>>, DataTypeOperationStatus>> GetReferencesAsync(Guid id)
Parameters Type Name Description Guid id
The guid Id of the IDataType
Returns View Source Move(IDataType, Int32) DeclarationAttempt<OperationResult<MoveOperationStatusType>> Move(IDataType toMove, int parentId)
Parameters Type Name Description IDataType toMove System.Int32 parentId Returns View Source MoveAsync(IDataType, Nullable<Guid>, Guid)
Moves a IDataType to a given container
DeclarationTask<Attempt<IDataType, DataTypeOperationStatus>> MoveAsync(IDataType toMove, Guid? containerKey, Guid userKey)
Parameters Type Name Description IDataType toMove
The data type that will be moved
System.Nullable<Guid> containerKeyThe container key where the data type will be moved to.
Guid userKeyThe user that did the Move action
Returns View Source RenameContainer(Int32, String, Int32) DeclarationAttempt<OperationResult<OperationResultType, EntityContainer>> RenameContainer(int id, string name, int userId = -1)
Parameters Type Name Description System.Int32 id System.String name System.Int32 userId Returns View Source Save(IEnumerable<IDataType>, Int32)
Saves a collection of IDataType
Declarationvoid Save(IEnumerable<IDataType> dataTypeDefinitions, int userId = -1)
Parameters Type Name Description IEnumerable<IDataType> dataTypeDefinitions
IDataType to save
System.Int32 userIdId of the user issuing the save
View Source Save(IDataType, Int32)Saves an IDataType
Declarationvoid Save(IDataType dataType, int userId = -1)
Parameters Type Name Description IDataType dataType
IDataType to save
System.Int32 userIdId of the user issuing the save
View Source SaveContainer(EntityContainer, Int32) DeclarationAttempt<OperationResult> SaveContainer(EntityContainer container, int userId = -1)
Parameters Returns View Source UpdateAsync(IDataType, Guid)
Updates an existing IDataType
DeclarationTask<Attempt<IDataType, DataTypeOperationStatus>> UpdateAsync(IDataType dataType, Guid userKey)
Parameters Type Name Description IDataType dataType
IDataType to update
Guid userKeyKey of the user issuing the update
Returns View Source ValidateConfigurationData(IDataType)Performs validation for the configuration data of a given data type.
DeclarationIEnumerable<ValidationResult> ValidateConfigurationData(IDataType dataType)
Parameters Type Name Description IDataType dataType
The data type whose configuration to validate.
Returns Type Description IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult>One or more System.ComponentModel.DataAnnotations.ValidationResult if the configuration data is invalid, an empty collection otherwise.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4