DynamicAppVar

Class Overview
Wrapper class to allow using the dynamic keyword to access objects'
methods, properties and fields just like ordinary class members.
One limitation is that you it is not possible to access members that have the same name as those
defined in the DynamicObject class.
In the case that you need to access such members, please use the FriendlyObject APIs.


public DynamicAppVar (AppVar appVar)
Description
Constructor

Parameter
appVar
AppVar to wrap



public bool Equals (Object obj)
Description
Equality. Returns the result of carrying out the equality operation inside the target application.

Return value
Comparison result

Parameter
obj
Object to compare



public int GetHashCode ()
Description
        Hash code access. Returns the result of the GetHashCode() operation within the target application.

Return value
Hash code



public dynamic GetType ()
Description
Type retrieval. Returns the result of the GetType() operation carried out within the target application.

Return value
Type object wrapped in a DynamicAppVar.



public dynamic MemberwiseClone ()
Description
Creates a shallow copy. Returns the result of the MemberwiseClone() carried out within the target application.

Return value
Shallow copy wrapped in a DynamicAppVar.



public static implicit operator DynamicAppVar (AppVar src)
Description
Casts an AppVar to a DynamicAppVar.

Return value
DynamicAppVar object

Parameters
src
AppVar object


public static implicit operator AppVar (DynamicAppVar src)
Description
Casts a DynamicAppVar to an AppVar.

Return value
AppVar object

Parameters
src
DynamicAppVar object



public string ToString ()
Description
String conversion. Returns the result of the ToString() operation carried out within the target application.

Return value
String.



public TryConvert (ConvertBinder binder, ref Object & result)
Description
Allows dynamic resolution for other types of casts.
Serializes the value from the target application and retrieves it.
Special cases
• When casting to IDisposable, an internal AppVar is returned.
· When casting to an IEnumerable, an IEnumerable<dynamic> is returned. The dynamic object in this case is a DynamicAppVar.
Return value
Success or failure

Parameters
binder
Binder
result
Cast result


public TryGetIndex (GetIndexBinder binder, ref Object [] indexes, ref Object & result)
Description
Provides dynamic resolution of get indexes.
Cannot be used asynchronously.
If you need asynchronous access, please cast the object to an AppVar and use
a FriendlyOperation, or access the index via its method name (.get_Item() for
object indexers and .Get() for array indices).
Examples:
    
    dynamic array = app.Copy(new int[10]); // Create a copy of an array within the target application
    int value = array[3];     // Synchronous access using index
    value = array.Get(3);   // Synchronous access using method
    dynamic value = array.Get(3, new Async());  // Asynchronous using .Get()
 
    dynamic list = app.Copy(new List<int>(new int[10]));
    int value = list[3];         // Synchronous using indexer
    value = list.get_Item(3, new Async());  // Asynchronous using .get_Item()
 

Return value
Success or failure

Parameters
binder
Binder
indexes
Index access arguments
result
Result



public TryGetMember (GetMemberBinder binder, ref Object & result)
Description
Provides dynamic resolution of properties and fields.
Cannot be used asynchronously.
If you need asynchronous access, please cast the object to an AppVar
and use a FriendlyOperation, or call it in the form of a method by specifying a
method name equal to the property name.

Return value
Success or failure

Parameters
binder
Binder
result
Acquisition result



public TryInvokeMember (InvokeMemberBinder binder, ref Object [] args, ref Object & result)
Description
Provides dynamic resolution of method calls.
To specify Async and/or OperationTypeInfo, please pass these as arguments.
They can be included in any order.

Return value
Success or failure

Parameters
binder
Binder
args
Argument
result
Return value



public TrySetIndex (SetIndexBinder binder, ref Object [] indexes, Object value)
Description
Provides dynamic resolution of set indexes.
Cannot be used asynchronously.
By casting AppVar, you can use the FriendlyOperation If you need asynchronous execution by all means,
Please execute the method call format.
Please use the (set_Item definition Set, in the object array aliases) index access method name.

Return value
Success or failure.

Parameters
binder
Binder.
indexes
Index access argument.
value
Value to be set.



public TrySetMember (SetMemberBinder binder, Object value)
Description
Provides dynamic resolution of properties and fields.
Cannot be used asynchronously.
If you need asynchronous access, please cast the object to an AppVar
and use a FriendlyOperation, or call it in the form of a method by specifying a
method name equal to the property name.
 

Return value
Success or failure

Parameters
binder
Binder
value
Setting

JR