Class CultureImpactFactory
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class CultureImpactFactory : ICultureImpactFactory
Constructors
View SourceCultureImpactFactory(IOptionsMonitor<ContentSettings>)
Declaration
public CultureImpactFactory(IOptionsMonitor<ContentSettings> contentSettings)
Parameters
Type | Name | Description |
---|---|---|
IOptionsMonitor<ContentSettings> | contentSettings |
CultureImpactFactory(IOptionsMonitor<SecuritySettings>)
Declaration
public CultureImpactFactory(IOptionsMonitor<SecuritySettings> securitySettings)
Parameters
Type | Name | Description |
---|---|---|
IOptionsMonitor<SecuritySettings> | securitySettings |
Methods
View SourceCreate(String, Boolean, IContent)
Creates an impact instance representing the impact of a culture set, in the context of a content item variation.
Declaration
public CultureImpact Create(string culture, bool isDefault, IContent content)
Parameters
Type | Name | Description |
---|---|---|
System.String | culture | The culture code. |
System.Boolean | isDefault | A value indicating whether the culture is the default culture. |
IContent | content | The content item. |
Returns
Type | Description |
---|---|
CultureImpact |
Remarks
Validates that the culture is compatible with the variation.
GetCultureForInvariantErrors(IContent, String[], String)
Utility method to return the culture used for invariant property errors based on what cultures are being actively saved, the default culture and the state of the current content item
Declaration
public string GetCultureForInvariantErrors(IContent content, string[] savingCultures, string defaultCulture)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
System.String[] | savingCultures | |
System.String | defaultCulture |
Returns
Type | Description |
---|---|
System.String |
ImpactAll()
Gets the impact of 'all' cultures (including the invariant culture).
Declaration
public CultureImpact ImpactAll()
Returns
Type | Description |
---|---|
CultureImpact |
ImpactExplicit(String, Boolean)
Creates an impact instance representing the impact of a specific culture.
Declaration
public CultureImpact ImpactExplicit(string culture, bool isDefault)
Parameters
Type | Name | Description |
---|---|---|
System.String | culture | The culture code. |
System.Boolean | isDefault | A value indicating whether the culture is the default culture. |
Returns
Type | Description |
---|---|
CultureImpact |
ImpactInvariant()
Gets the impact of the invariant culture.
Declaration
public CultureImpact ImpactInvariant()
Returns
Type | Description |
---|---|
CultureImpact |