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
[SoInject("Database")]
public class ServicePreferenceMapper

Properties

MappedSections

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

Mappings

Declaration
public Dictionary<(string section, string key), ServicePreferenceMappings.PreferenceMappingInfo> Mappings { get; }
Property Value
Type Description
Dictionary<ValueTuple<String, String>, 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.

CheckForMappingAndSavePreference(String, String, String, Int32)

Declaration
public int CheckForMappingAndSavePreference(string section, string key, string value, int ownerId)
Parameters
Type Name Description
String section
String key
String value
Int32 ownerId
Returns
Type Description
Int32

FetchIndividualValues()

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

FetchSinglePreference(String, String, PreferenceLevel, Int32)

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
Int32 ownerId
Returns
Type Description
ValueTuple<Int32, String>

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