RazorDynamicObject
Defined in RazorEngine.dll.
Wraps a dynamic object for serialization of dynamic objects and anonymous type support.
But this type will also make (static) types work which are not serializable.
Constructors
Constructor | Description |
new(info, context)
Signature: (info:SerializationInfo * context:StreamingContext) -> unit
|
Initializes a new instance of the RazorDynamicObject class. |
Instance members
Instance member | Description |
Dispose()
Signature: unit -> unit
Modifiers: abstract |
Disposes the current instance. |
GetObjectData(info, context)
Signature: (info:SerializationInfo * context:StreamingContext) -> unit
Modifiers: abstract |
Populates a SerializationInfo with the data needed to serialize the target object. |
ToString()
Signature: unit -> string
Modifiers: abstract |
Override ToString and remotely invoke our wrapped instance. |
TryConvert(binder, result)
Signature: (binder:ConvertBinder * result:byref<obj>) -> bool
Modifiers: abstract |
|
TryGetIndex(binder, indexes, result)
Signature: (binder:GetIndexBinder * indexes:obj [] * result:byref<obj>) -> bool
Modifiers: abstract |
|
TryGetMember(binder, result)
Signature: (binder:GetMemberBinder * result:byref<obj>) -> bool
Modifiers: abstract |
|
TryInvokeMember(binder, args, result)
Signature: (binder:InvokeMemberBinder * args:obj [] * result:byref<obj>) -> bool
Modifiers: abstract |
|
TrySetIndex(binder, indexes, value)
Signature: (binder:SetIndexBinder * indexes:obj [] * value:obj) -> bool
Modifiers: abstract |
|
TrySetMember(binder, value)
Signature: (binder:SetMemberBinder * value:obj) -> bool
Modifiers: abstract |
Tries to set the member. |
Static members
Static member | Description |
Cast(o)
Signature: o:obj -> obj
Type parameters: 'T |
A simple generic cast method. Used for the DynamicCast implementation. |
CompatibleWith(...)
Signature: (parameterInfo:ParameterInfo [] * paramTypes:Type []) -> bool
|
|
Create(wrapped, allowMissingMembers)
Signature: (wrapped:obj * allowMissingMembers:bool) -> obj
|
Create a wrapper around an dynamic object. This wrapper ensures that we can cross the AppDomain, call internal methods (to make Anonymous types work), or call missing methods (when allowMissingMembers is true). |
DynamicCast(o, targetType)
Signature: (o:obj * targetType:Type) -> obj
|
A tricky dynamic cast (Cast in the runtime with dynamic types). |
IsPrimitive(target)
Signature: target:obj -> bool
|
Returnes true when the type of the given result is primitive. (ie should not be wrapped in another RazorDynamicObject instance) |
MapInterface(interface)
Signature: interface:Type -> Type
|
Convert the given interface type instance in another interface type instance which is free of anonymous types. |
MapType(type)
Signature: type:Type -> Type
|
Try to find a type instance which has no references to anonymous types. Either we use the type or create a new one which implements the same interfaces. |