PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Weaver Namespace / Reflection­Object­Builder Class / Reflection­Object­Builder Methods / Reflection­Object­Builder.​Is­Cacheable Method

ReflectionObjectBuilder.IsCacheable Method

Determines whether a reflection object can be cached at runtime.

Namespace:  PostSharp.Sdk.AspectWeaver
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public abstract bool IsCacheable(
	IMetadataDeclaration declaration,
	Object parentDeclaration
)

Parameters

declaration
Type: PostSharp.Sdk.CodeModel.IMetadataDeclaration
A declaration.
parentDeclaration
Type: System.Object

Return Value

Type: Boolean
true if it is possible to cache the reflection object corresponding to declaration at run time , false otherwise (typically, because the declaration requires generic arguments).
See Also