@@ -72,7 +72,7 @@ type DynamicObj() =
7272 member this.SetValue ( name , value ) = // private
7373 // first check to see if there's a native property to set
7474
75- match ReflectionUtils.tryGetStaticPropertyInfo this name with
75+ match this.TryGetStaticPropertyInfo name with
7676 | Some pi ->
7777 if pi.IsMutable then
7878 pi.SetValue this value
@@ -133,36 +133,13 @@ type DynamicObj() =
133133 /// Returns both instance and dynamic properties when passed true, only dynamic properties otherwise.
134134 /// Properties are returned as a key value pair of the member names and the boxed values
135135 member this.GetProperties includeInstanceProperties : seq < KeyValuePair < string , obj >> =
136- #if FABLE_ COMPILER_ JAVASCRIPT || FABLE_ COMPILER_ TYPESCRIPT
137- FableJS.getPropertyHelpers this
138- |> Seq.choose ( fun pd ->
139- if includeInstanceProperties || pd.IsDynamic then
140- new KeyValuePair< string, obj>( pd.Name, pd.GetValue this)
141- |> Some
136+ this.GetPropertyHelpers( includeInstanceProperties)
137+ |> Seq.choose ( fun kv ->
138+ if kv.Name <> " properties" then
139+ Some ( KeyValuePair( kv.Name, kv.GetValue this))
142140 else
143- None
141+ None
144142 )
145- #endif
146- #if FABLE_ COMPILER_ PYTHON
147- FablePy.getPropertyHelpers this
148- |> Seq.choose ( fun pd ->
149- if includeInstanceProperties || pd.IsDynamic then
150- new KeyValuePair< string, obj>( pd.Name, pd.GetValue this)
151- |> Some
152- else
153- None
154- )
155- #endif
156- #if ! FABLE_ COMPILER
157- seq [
158- if includeInstanceProperties then
159- for prop in ReflectionUtils.getStaticProperties ( this) ->
160- new KeyValuePair< string, obj>( prop.Name, prop.GetValue( this))
161- for key in properties.Keys ->
162- new KeyValuePair< string, obj>( key, properties.[ key]);
163- ]
164- #endif
165- |> Seq.filter ( fun kv -> kv.Key.ToLower() <> " properties" )
166143
167144 /// Copies all dynamic members of the DynamicObj to the target DynamicObj.
168145 member this.CopyDynamicPropertiesTo ( target : #DynamicObj , ? overWrite ) =
0 commit comments