Click or drag to resize

ScriptEngineEnforceAnonymousTypeAccess Property

Enables or disables access restrictions for anonymous types.

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax
public bool EnforceAnonymousTypeAccess { get; set; }

Property Value

Boolean

Implements

IScriptEngineEnforceAnonymousTypeAccess
Remarks
Anonymous types are internal and therefore accessible only within the same assembly, but ClearScript 5.5.3 and earlier permitted access to the properties of an object even if its type was internal. Newer versions strictly enforce AccessContext, but because anonymous types are particularly useful for scripting, ClearScript by default continues to expose their properties to external contexts. To override this behavior and enable normal access restrictions for anonymous types, set this property to true.
See Also