@@ -250,6 +250,9 @@ public void Register(string name, object value, bool isAsync, BindingOptions opt
250250 jsObject . IsAsync = isAsync ;
251251 jsObject . Binder = options ? . Binder ;
252252 jsObject . MethodInterceptor = options ? . MethodInterceptor ;
253+ #if ! NETCOREAPP
254+ jsObject . PropertyInterceptor = options ? . PropertyInterceptor ;
255+ #endif
253256
254257 AnalyseObjectForBinding ( jsObject , analyseMethods : true , analyseProperties : ! isAsync , readPropertyValue : false ) ;
255258 }
@@ -562,6 +565,7 @@ protected virtual async Task<TryCallMethodResult> TryCallMethodAsync(long object
562565 return new TryCallMethodResult ( false , result , exception ) ;
563566 }
564567
568+ #if ! NETCOREAPP
565569 bool IJavascriptObjectRepositoryInternal . TryGetProperty ( long objectId , string name , out object result , out string exception )
566570 {
567571 return TryGetProperty ( objectId , name , out result , out exception ) ;
@@ -585,8 +589,14 @@ protected virtual bool TryGetProperty(long objectId, string name, out object res
585589
586590 try
587591 {
588- result = property . GetValue ( obj . Value ) ;
589-
592+ if ( obj . PropertyInterceptor == null )
593+ {
594+ result = property . GetValue ( obj . Value ) ;
595+ }
596+ else
597+ {
598+ result = obj . PropertyInterceptor . InterceptGet ( ( ) => property . GetValue ( obj . Value ) , property . ManagedName ) ;
599+ }
590600 return true ;
591601 }
592602 catch ( Exception ex )
@@ -596,7 +606,9 @@ protected virtual bool TryGetProperty(long objectId, string name, out object res
596606
597607 return false ;
598608 }
609+ #endif
599610
611+ #if ! NETCOREAPP
600612 bool IJavascriptObjectRepositoryInternal . TrySetProperty ( long objectId , string name , object value , out string exception )
601613 {
602614 return TrySetProperty ( objectId , name , value , out exception ) ;
@@ -618,8 +630,14 @@ protected virtual bool TrySetProperty(long objectId, string name, object value,
618630 }
619631 try
620632 {
621- property . SetValue ( obj . Value , value ) ;
622-
633+ if ( obj . PropertyInterceptor == null )
634+ {
635+ property . SetValue ( obj . Value , value ) ;
636+ }
637+ else
638+ {
639+ obj . PropertyInterceptor . InterceptSet ( ( p ) => property . SetValue ( obj . Value , p ) , value , property . ManagedName ) ;
640+ }
623641 return true ;
624642 }
625643 catch ( Exception ex )
@@ -629,6 +647,8 @@ protected virtual bool TrySetProperty(long objectId, string name, object value,
629647
630648 return false ;
631649 }
650+ #endif
651+
632652
633653 /// <summary>
634654 /// Analyse the object and generate metadata which will
0 commit comments