ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript.V8.FastProxy
V8FastHostObjectConfiguration<TObject> Class
V8FastHostObjectConfiguration<TObject> Methods
AddPropertyGetter Method
AddPropertyGetter(String, V8FastHostPropertyGetter<TObject>) Method
AddPropertyGetter<TField>(String, V8FastHostFieldAccessor<TObject, TField>) Method
AddPropertyGetter(String, V8FastHostPropertyGetter<TObject>, V8FastHostPropertyFlags) Method
AddPropertyGetter<TField>(String, V8FastHostFieldAccessor<TObject, TField>, V8FastHostPropertyFlags) Method

# V8FastHostObjectConfiguration TObject AddPropertyGetter TField(String, V8FastHostFieldAccessor TObject, TField) Method

Adds a getter for a field-backed read-only property.
Namespace: Microsoft.ClearScript.V8.FastProxy
Assembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public void AddPropertyGetter<TField>(
    	string name,
    	V8FastHostFieldAccessor<TObject, TField> accessor
    )

    Public Sub AddPropertyGetter(Of TField) (
    	name As String,
    	accessor As V8FastHostFieldAccessor(Of TObject, TField)
    )

    public:
    generic<typename TField>
    void AddPropertyGetter(
    	String^ name,
    	V8FastHostFieldAccessor<TObject, TField>^ accessor
    )

    member AddPropertyGetter :
            name : string *
            accessor : V8FastHostFieldAccessor<'TObject, 'TField> -> unit

#### Parameters

name String
  The property name.
accessor V8FastHostFieldAccessor TObject, TField
  A callback that provides access to the field.

#### Type Parameters

TField
  The field type.

Remarks
Properties configured by this method are not enumerable and cannot be assigned or deleted.
See Also

#### Reference

V8FastHostObjectConfigurationTObject Class
AddPropertyGetter Overload
Microsoft.ClearScript.V8.FastProxy Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft