V8FastHostObjectConfiguration<TObject>.AddPropertyGetter<TField>(String, V8FastHostFieldAccessor<TObject, TField>, V8FastHostPropertyFlags) Method |
Adds a getter for a field-backed read-only property with the specified attributes.
Namespace: Microsoft.ClearScript.V8.FastProxyAssembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.5.0
Syntaxpublic void AddPropertyGetter<TField>(
string name,
V8FastHostFieldAccessor<TObject, TField> accessor,
V8FastHostPropertyFlags flags
)
Public Sub AddPropertyGetter(Of TField) (
name As String,
accessor As V8FastHostFieldAccessor(Of TObject, TField),
flags As V8FastHostPropertyFlags
)
public:
generic<typename TField>
void AddPropertyGetter(
String^ name,
V8FastHostFieldAccessor<TObject, TField>^ accessor,
V8FastHostPropertyFlags flags
)
member AddPropertyGetter :
name : string *
accessor : V8FastHostFieldAccessor<'TObject, 'TField> *
flags : V8FastHostPropertyFlags -> unit
Parameters
- name String
- The property name.
- accessor V8FastHostFieldAccessor<TObject, TField>
- A callback that provides access to the field.
- flags V8FastHostPropertyFlags
- The attributes of the property configured by this method.
Type Parameters
- TField
- The field type.
Remarks
In the context of this method, the only effective property attributes are
Cacheable and
Enumerable. Properties configured by this
method cannot be assigned or deleted.
See Also