Class StructurePatchingTypeCache
Per-Type reflection cache used by IStructurePatchingHelper implementations.
Inherited Members
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.