Table of Contents

Class ColorSchemeHelper

Namespace
Dynamicweb.Content.Styles.ColorSchemes
Assembly
Dynamicweb.dll

Helper class with supporting methods to work with color schemes.

public static class ColorSchemeHelper
Inheritance
ColorSchemeHelper
Inherited Members

Methods

Delete(string)

Deletes the color scheme group by id

public static void Delete(string schemeGroupId)

Parameters

schemeGroupId string

The color scheme group id

Exceptions

ArgumentNullException
InvalidOperationException

Thrown if the deleted color group is used

Delete(string, string)

Deletes the color scheme

public static void Delete(string schemeGroupId, string schemeId)

Parameters

schemeGroupId string

The color scheme group id

schemeId string

The color scheme id

Exceptions

ArgumentNullException
InvalidOperationException

Thrown if the deleted color is used

GetAllColorSchemeGroups()

Get all color scheme groups

public static IEnumerable<ColorSchemeGroup> GetAllColorSchemeGroups()

Returns

IEnumerable<ColorSchemeGroup>

A list of ColorSchemeGroup

GetColorScheme(ColorSchemeGroup, string)

Gets the color scheme

public static ColorScheme? GetColorScheme(ColorSchemeGroup schemeGroup, string colorSchemeId)

Parameters

schemeGroup ColorSchemeGroup

The color scheme group

colorSchemeId string

The color scheme id

Returns

ColorScheme

GetColorScheme(string, string)

Gets the color scheme

public static ColorScheme? GetColorScheme(string schemeGroupId, string colorSchemeId)

Parameters

schemeGroupId string

The color scheme group id

colorSchemeId string

The color scheme id

Returns

ColorScheme

GetColorSchemeGroup(string)

Gets the color scheme group by id

public static ColorSchemeGroup? GetColorSchemeGroup(string schemeGroupId)

Parameters

schemeGroupId string

The color scheme group id

Returns

ColorSchemeGroup

GetColorSchemeUsageCount(string)

Gets the list of using info of a color scheme group

public static IDictionary<string, int> GetColorSchemeUsageCount(string schemeGroupId)

Parameters

schemeGroupId string

The color scheme group id

Returns

IDictionary<string, int>

GetColorSchemeUsageInfo(string, string)

Gets the list of using info of a ColorScheme

public static IEnumerable<ColorSchemeUsageInfo> GetColorSchemeUsageInfo(string schemeGroupId, string schemeId)

Parameters

schemeGroupId string

The color scheme group id

schemeId string

The color scheme id

Returns

IEnumerable<ColorSchemeUsageInfo>

IsInUse(string)

Check scheme group is used

public static bool IsInUse(string schemeGroupId)

Parameters

schemeGroupId string

The color scheme group id

Returns

bool

ReplaceWithExistingId(string, string, string)

Replace colorscheme with other one everywhere in content

public static int ReplaceWithExistingId(string schemeGroupId, string schemeId, string existingSchemeId)

Parameters

schemeGroupId string

The color scheme group id

schemeId string

The color scheme id

existingSchemeId string

The existing color scheme id

Returns

int

The number of records affected

Exceptions

ArgumentNullException

ReplaceWithNewId(string, string, string)

Replace colorscheme Id and update all its usages everywhere in content

public static int ReplaceWithNewId(string schemeGroupId, string schemeId, string newSchemeId)

Parameters

schemeGroupId string

The color scheme group id

schemeId string

The color scheme id

newSchemeId string

The new color scheme id

Returns

int

The number of records affected

Exceptions

ArgumentNullException

Save(ColorSchemeGroup)

Saves the color scheme group

public static void Save(ColorSchemeGroup schemeGroup)

Parameters

schemeGroup ColorSchemeGroup

The color scheme group

To top