Show / Hide Table of Contents

Class ServicePreferenceMapper

Handle the mapping of some sections in userpreference to actually be stored in the config, registry and password_rules tables; backwards compatibility with Service

Inheritance
object
ServicePreferenceMapper
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Data
Assembly: SoDataBase.dll
Syntax
public class ServicePreferenceMapper

Constructors

ServicePreferenceMapper(ServicePreferenceMappings, ICacheManager)

Handle the mapping of some sections in userpreference to actually be stored in the config, registry and password_rules tables; backwards compatibility with Service

Declaration
public ServicePreferenceMapper(ServicePreferenceMappings mappings, ICacheManager cacheManager)
Parameters
Type Name Description
ServicePreferenceMappings mappings
ICacheManager cacheManager

Properties

MappedSections

Handle the mapping of some sections in userpreference to actually be stored in the config, registry and password_rules tables; backwards compatibility with Service

Declaration
public HashSet<string> MappedSections { get; }
Property Value
Type Description
HashSet<string>

Mappings

Handle the mapping of some sections in userpreference to actually be stored in the config, registry and password_rules tables; backwards compatibility with Service

Declaration
public Dictionary<(string section, string key), ServicePreferenceMappings.PreferenceMappingInfo> Mappings { get; }
Property Value
Type Description
Dictionary<(string section, string key), ServicePreferenceMappings.PreferenceMappingInfo>

Methods

CheckForMappingAndFetchIntoCache(string)

If the given section is one of ours, read all our mapped stuff and update the cache.

Declaration
public string[] CheckForMappingAndFetchIntoCache(string section)
Parameters
Type Name Description
string section
Returns
Type Description
string[]
Remarks

This is a simple and reasonable? optimization: touch anything that is mapped, and we get all of them, once.

CheckForMappingAndSavePreferenceAsync(string, string, string, int, CancellationToken)

Handle the mapping of some sections in userpreference to actually be stored in the config, registry and password_rules tables; backwards compatibility with Service

Declaration
public Task<int> CheckForMappingAndSavePreferenceAsync(string section, string key, string value, int ownerId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string section
string key
string value
int ownerId
CancellationToken cancellationToken
Returns
Type Description
Task<int>

FetchIndividualValues()

Handle the mapping of some sections in userpreference to actually be stored in the config, registry and password_rules tables; backwards compatibility with Service

Declaration
public List<(string section, string key, int associateId, string value)> FetchIndividualValues()
Returns
Type Description
List<(string section, string key, int associateId, string value)>

FetchSinglePreference(string, string, PreferenceLevel, int)

Handle the mapping of some sections in userpreference to actually be stored in the config, registry and password_rules tables; backwards compatibility with Service

Declaration
public (int fakeId, string rawValue) FetchSinglePreference(string section, string key, PreferenceLevel prefLevel, int ownerId)
Parameters
Type Name Description
string section
string key
PreferenceLevel prefLevel
int ownerId
Returns
Type Description
(int fakeId, string rawValue)

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top