ScriptEngineEnforceAnonymousTypeAccess Property |
Enables or disables access restrictions for anonymous types.
Namespace: Microsoft.ClearScriptAssembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax public bool EnforceAnonymousTypeAccess { get; set; }
Public Property EnforceAnonymousTypeAccess As Boolean
Get
Set
public:
virtual property bool EnforceAnonymousTypeAccess {
bool get () sealed;
void set (bool value) sealed;
}
abstract EnforceAnonymousTypeAccess : bool with get, set
override EnforceAnonymousTypeAccess : bool with get, set
Property Value
BooleanImplements
IScriptEngineEnforceAnonymousTypeAccessRemarks
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