Show / Hide Table of Contents

Class SoDatabaseContextStatic<T>

Helper class for storing things in a Database Context (that used to be static)

Inheritance
object
SoDatabaseContextStatic<T>
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice
Assembly: SoCore.dll
Syntax
public sealed class SoDatabaseContextStatic<T> where T : class
Type Parameters
Name Description
T

Type of value to hold

Remarks

Call SafeGetValue to make sure the inner object is created as needed

Constructors

SoDatabaseContextStatic()

Helper class for storing things in a Database Context (that used to be static)

Declaration
public SoDatabaseContextStatic()
Remarks

Call SafeGetValue to make sure the inner object is created as needed

Properties

Value

Get the inner value from the database instance context.

Declaration
public T Value { get; set; }
Property Value
Type Description
T
Remarks

Call SafeGetValue to make sure the inner object is created as needed

Methods

SafeGetValue(Func<T>)

Get value from the database instance container and create a new if needed.

Declaration
public T SafeGetValue(Func<T> create)
Parameters
Type Name Description
Func<T> create

Function for creating a new instance. Called only if an exisisting value is not allready present.

Returns
Type Description
T
Remarks

Call SafeGetValue to make sure the inner object is created as needed

Extension Methods

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