Class PropertyTypeUsageService
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class PropertyTypeUsageService : IPropertyTypeUsageService
Constructors
View SourcePropertyTypeUsageService(IPropertyTypeUsageRepository, ICoreScopeProvider)
Declaration
public PropertyTypeUsageService(IPropertyTypeUsageRepository propertyTypeUsageRepository, ICoreScopeProvider scopeProvider)
Parameters
Type | Name | Description |
---|---|---|
IPropertyTypeUsageRepository | propertyTypeUsageRepository | |
ICoreScopeProvider | scopeProvider |
PropertyTypeUsageService(IPropertyTypeUsageRepository, IContentTypeService, ICoreScopeProvider)
Declaration
public PropertyTypeUsageService(IPropertyTypeUsageRepository propertyTypeUsageRepository, IContentTypeService contentTypeService, ICoreScopeProvider scopeProvider)
Parameters
Type | Name | Description |
---|---|---|
IPropertyTypeUsageRepository | propertyTypeUsageRepository | |
IContentTypeService | contentTypeService | |
ICoreScopeProvider | scopeProvider |
Methods
View SourceHasSavedPropertyValues(String)
Checks if a property type has any saved property values associated with it.
Declaration
public bool HasSavedPropertyValues(string propertyTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | The alias of the property type to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the property type has any property values, otherwise false. |
HasSavedPropertyValuesAsync(Guid, String)
Checks if a property type has any saved property values associated with it.
Declaration
public async Task<Attempt<bool, PropertyTypeOperationStatus>> HasSavedPropertyValuesAsync(Guid contentTypeKey, string propertyAlias)
Parameters
Type | Name | Description |
---|---|---|
Guid | contentTypeKey | The key of the content type to check. |
System.String | propertyAlias | The alias of the property to check. |
Returns
Type | Description |
---|---|
Task<Attempt<System.Boolean, PropertyTypeOperationStatus>> | An attempt with status and result if the property type has any property values, otherwise false. |