Context.RegisterDynamicProperty(IDynamicProperty, ContextBoundObject, Context) Método
Definición
Registra una propiedad dinámica que implementa la interfaz IDynamicProperty con el servicio de comunicación remota.Registers a dynamic property implementing the IDynamicProperty interface with the remoting service.
Esta API admite la infraestructura de producto y no está pensada para usarse directamente en el código.
public:
static bool RegisterDynamicProperty(System::Runtime::Remoting::Contexts::IDynamicProperty ^ prop, ContextBoundObject ^ obj, System::Runtime::Remoting::Contexts::Context ^ ctx);
public static bool RegisterDynamicProperty (System.Runtime.Remoting.Contexts.IDynamicProperty prop, ContextBoundObject obj, System.Runtime.Remoting.Contexts.Context ctx);
static member RegisterDynamicProperty : System.Runtime.Remoting.Contexts.IDynamicProperty * ContextBoundObject * System.Runtime.Remoting.Contexts.Context -> bool
Public Shared Function RegisterDynamicProperty (prop As IDynamicProperty, obj As ContextBoundObject, ctx As Context) As Boolean
Parámetros
- prop
- IDynamicProperty
La propiedad dinámica que se va a registrar.The dynamic property to register.
Objeto/servidor proxy para el que se va a registrar property
.The object/proxy for which the property
is registered.
- ctx
- Context
Contexto para el que se va a registrar property
.The context for which the property
is registered.
Devoluciones
Es true
si la propiedad se registra correctamente; en caso contrario, es false
.true
if the property was successfully registered; otherwise, false
.
Excepciones
O prop
o su nombre son null
, o bien, la propiedad no es dinámica (no implementa IDynamicProperty).Either prop
or its name is null
, or it is not dynamic (it does not implement IDynamicProperty).
Se ha especificado un objeto y un contexto (obj
y ctx
no son null
).Both an object as well as a context are specified (both obj
and ctx
are not null
).
Comentarios
Según obj
y ctx
, prop
se le pide que contribuya a un receptor que se coloca en alguna ubicación en la ruta de acceso de llamadas remotas.Based on obj
and ctx
, prop
is asked to contribute a sink that is placed at some location in the path of remoting calls. Si se registran varias propiedades, se llamará a sus receptores en un orden arbitrario que pueda cambiar entre llamadas.If multiple properties are registered, their sinks will be called in an arbitrary order that can change between calls.
Si obj
no es null
y, a continuación, si es un proxy, se interceptan todas las llamadas realizadas en el proxy.If obj
is not null
, and then if it is a proxy, all calls made on the proxy are intercepted. De lo contrario, si obj
es un objeto real, se interceptan todas las llamadas en el objeto.Otherwise, if obj
is a real object, all calls on the object are intercepted. El ctx
parámetro debe ser null
.The ctx
parameter must be null
.
Si ctx
no es null
, obj
debe ser null
y todas las llamadas que entran y abandonan el contexto se interceptan.If ctx
is not null
, obj
must be null
and all calls entering and leaving the context are intercepted.
Si tanto ctx
como obj
son null
, se interceptan todas las llamadas que entran y abandonan todos los contextos.If both ctx
and obj
are null
, all calls entering and leaving all contexts are intercepted.