Show / Hide Table of Contents

Class StructurePatchingTypeCache

Per-Type reflection cache used by IStructurePatchingHelper implementations.

Inheritance
object
StructurePatchingTypeCache
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public sealed class StructurePatchingTypeCache
Remarks

Concrete Carrier types are emitted by a dev-time pre-compile step; there is no runtime type emission tied to tenant metadata. The Type-to-descriptor mapping is therefore immutable for the lifetime of the process and identical across tenants, so this cache is registered as a process-wide singleton.

Constructors

StructurePatchingTypeCache()

Per-Type reflection cache used by IStructurePatchingHelper implementations.

Declaration
public StructurePatchingTypeCache()
Remarks

Concrete Carrier types are emitted by a dev-time pre-compile step; there is no runtime type emission tied to tenant metadata. The Type-to-descriptor mapping is therefore immutable for the lifetime of the process and identical across tenants, so this cache is registered as a process-wide singleton.

Properties

CachedTypeCount

Number of distinct types observed so far.

Declaration
public int CachedTypeCount { get; }
Property Value
Type Description
int
Remarks

Concrete Carrier types are emitted by a dev-time pre-compile step; there is no runtime type emission tied to tenant metadata. The Type-to-descriptor mapping is therefore immutable for the lifetime of the process and identical across tenants, so this cache is registered as a process-wide singleton.

CachedTypes

Snapshot of the types currently cached. Primarily intended for diagnostics and tests.

Declaration
public IReadOnlyCollection<Type> CachedTypes { get; }
Property Value
Type Description
IReadOnlyCollection<Type>
Remarks

Concrete Carrier types are emitted by a dev-time pre-compile step; there is no runtime type emission tied to tenant metadata. The Type-to-descriptor mapping is therefore immutable for the lifetime of the process and identical across tenants, so this cache is registered as a process-wide singleton.

Hits

Number of SuperOffice.Util.StructurePatchingTypeCache.GetOrAdd(System.Type) calls served from the cache.

Declaration
public long Hits { get; }
Property Value
Type Description
long
Remarks

Concrete Carrier types are emitted by a dev-time pre-compile step; there is no runtime type emission tied to tenant metadata. The Type-to-descriptor mapping is therefore immutable for the lifetime of the process and identical across tenants, so this cache is registered as a process-wide singleton.

Misses

Number of SuperOffice.Util.StructurePatchingTypeCache.GetOrAdd(System.Type) calls that had to build a new descriptor.

Declaration
public long Misses { get; }
Property Value
Type Description
long
Remarks

Concrete Carrier types are emitted by a dev-time pre-compile step; there is no runtime type emission tied to tenant metadata. The Type-to-descriptor mapping is therefore immutable for the lifetime of the process and identical across tenants, so this cache is registered as a process-wide singleton.

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