Property | Type | Description | |
---|---|---|---|
DoSet | void | ||
IsSetDescriptor | bool | ||
MakeGetExpression | void | ||
ShouldSetOrDelete | bool | ||
TryDeleteValue | bool | ||
TryGetValue | bool | ||
TrySetValue | bool | ||
TrySetValueWorker | bool | ||
__delete__ | void |
Method | Description | |
---|---|---|
GetValue ( Microsoft.Scripting.CodeContext context, object instance ) : object |
Convenience function for users to call directly
|
|
ReflectedField ( |
||
ReflectedField ( |
||
SetValue ( Microsoft.Scripting.CodeContext context, object instance, object value ) : void |
This function can be used to set a field on a value type without emitting a warning. Otherwise it is provided only to have symmetry with properties which have GetValue/SetValue for supporting explicitly implemented interfaces. Setting fields on value types usually warns because it can silently fail to update the value you expect. For example consider this example where Point is a value type with the public fields X and Y: arr = System.Array.CreateInstance(Point, 10) arr[0].X = 42 print arr[0].X prints 0. This is because reading the value from the array creates a copy of the value. Setting the value then mutates the copy and the array does not get updated. The same problem exists when accessing members of a class.
|
|
__repr__ ( Microsoft.Scripting.CodeContext context ) : string | ||
__set__ ( Microsoft.Scripting.CodeContext context, object instance, object value ) : void |
Method | Description | |
---|---|---|
DoSet ( Microsoft.Scripting.CodeContext context, object instance, object val, bool suppressWarning ) : void | ||
IsSetDescriptor ( Microsoft.Scripting.CodeContext context, IronPython.Runtime.Types.PythonType owner ) : bool | ||
MakeGetExpression ( |
||
ShouldSetOrDelete ( IronPython.Runtime.Types.PythonType type ) : bool | ||
TryDeleteValue ( Microsoft.Scripting.CodeContext context, object instance, IronPython.Runtime.Types.PythonType owner ) : bool | ||
TryGetValue ( Microsoft.Scripting.CodeContext context, object instance, IronPython.Runtime.Types.PythonType owner, object &value ) : bool | ||
TrySetValue ( Microsoft.Scripting.CodeContext context, object instance, IronPython.Runtime.Types.PythonType owner, object value ) : bool | ||
TrySetValueWorker ( Microsoft.Scripting.CodeContext context, object instance, IronPython.Runtime.Types.PythonType owner, object value, bool suppressWarning ) : bool | ||
__delete__ ( object instance ) : void |
public GetValue ( Microsoft.Scripting.CodeContext context, object instance ) : object | ||
context | Microsoft.Scripting.CodeContext | |
instance | object | |
return | object |
public ReflectedField ( |
||
info | ||
return | System.Linq.Expressions |
public ReflectedField ( |
||
info | ||
nameType | NameType | |
return | System.Linq.Expressions |
public SetValue ( Microsoft.Scripting.CodeContext context, object instance, object value ) : void | ||
context | Microsoft.Scripting.CodeContext | |
instance | object | |
value | object | |
return | void |
public __repr__ ( Microsoft.Scripting.CodeContext context ) : string | ||
context | Microsoft.Scripting.CodeContext | |
return | string |
public __set__ ( Microsoft.Scripting.CodeContext context, object instance, object value ) : void | ||
context | Microsoft.Scripting.CodeContext | |
instance | object | |
value | object | |
return | void |