ScriptEngineEnforceAnonymousTypeAccess Property |
Enables or disables access restrictions for anonymous types.
Namespace:
Microsoft.ClearScript
Assembly:
ClearScript.Core (in ClearScript.Core.dll) Version: 7.3.1
Syntaxpublic bool EnforceAnonymousTypeAccess { get; set; }
Public Property EnforceAnonymousTypeAccess As Boolean
Get
Set
public:
property bool EnforceAnonymousTypeAccess {
bool get ();
void set (bool value);
}
member EnforceAnonymousTypeAccess : bool with get, set
Property Value
Type:
Boolean
Remarks
Anonymous types are
internal
and therefore accessible only within the same assembly, but ClearScript 5.5.3 and
earlier permitted access to the public 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