C# Class Microsoft.Scripting.ComInterop.ComEventSink

This class implements an event sink for a particular RCW. Unlike the implementation of events in TlbImp'd assemblies, we will create only one event sink per RCW (theoretically RCW might have several ComEventSink evenk sinks - but all these implement different source intefaces). Each ComEventSink contains a list of ComEventSinkMethod objects - which represent a single method on the source interface an a multicast delegate to redirect the calls. Notice that we are chaining multicast delegates so that same ComEventSinkMedhod can invoke multiple event handlers). ComEventSink implements an IDisposable pattern to Unadvise from the connection point. Typically, when RCW is finalized the corresponding Dispose will be triggered by ComEventSinksContainer finalizer. Notice that lifetime of ComEventSinksContainer is bound to the lifetime of the RCW.
Inheritance: System.MarshalByRefObject, IReflect, IDisposable
Afficher le fichier Open project: jschementi/iron Class Usage Examples

Méthodes publiques

Méthode Description
AddHandler ( int dispid, object func ) : void
Dispose ( ) : void
ExecuteHandler ( string name, object args ) : object
FromRuntimeCallableWrapper ( object rcw, System.Guid sourceIid, bool createIfNotFound ) : ComEventSink
GetField ( string name, BindingFlags bindingAttr ) : FieldInfo
GetFields ( BindingFlags bindingAttr ) : System.Reflection.FieldInfo[]
GetMember ( string name, BindingFlags bindingAttr ) : MemberInfo[]
GetMembers ( BindingFlags bindingAttr ) : MemberInfo[]
GetMethod ( string name, BindingFlags bindingAttr ) : MethodInfo
GetMethod ( string name, BindingFlags bindingAttr, Binder binder, Type types, ParameterModifier modifiers ) : MethodInfo
GetMethods ( BindingFlags bindingAttr ) : System.Reflection.MethodInfo[]
GetProperties ( BindingFlags bindingAttr ) : System.Reflection.PropertyInfo[]
GetProperty ( string name, BindingFlags bindingAttr ) : PropertyInfo
GetProperty ( string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type types, ParameterModifier modifiers ) : PropertyInfo
InvokeMember ( string name, BindingFlags invokeAttr, Binder binder, object target, object args, ParameterModifier modifiers, CultureInfo culture, string namedParameters ) : object
RemoveHandler ( int dispid, object func ) : void

Private Methods

Méthode Description
ComEventSink ( object rcw, System.Guid sourceIid ) : System
DisposeAll ( ) : void
FindSinkMethod ( string name ) : ComEventSinkMethod
Initialize ( object rcw, System.Guid sourceIid ) : void

Method Details

AddHandler() public méthode

public AddHandler ( int dispid, object func ) : void
dispid int
func object
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

ExecuteHandler() public méthode

public ExecuteHandler ( string name, object args ) : object
name string
args object
Résultat object

FromRuntimeCallableWrapper() public static méthode

public static FromRuntimeCallableWrapper ( object rcw, System.Guid sourceIid, bool createIfNotFound ) : ComEventSink
rcw object
sourceIid System.Guid
createIfNotFound bool
Résultat ComEventSink

GetField() public méthode

public GetField ( string name, BindingFlags bindingAttr ) : FieldInfo
name string
bindingAttr BindingFlags
Résultat System.Reflection.FieldInfo

GetFields() public méthode

public GetFields ( BindingFlags bindingAttr ) : System.Reflection.FieldInfo[]
bindingAttr BindingFlags
Résultat System.Reflection.FieldInfo[]

GetMember() public méthode

public GetMember ( string name, BindingFlags bindingAttr ) : MemberInfo[]
name string
bindingAttr BindingFlags
Résultat MemberInfo[]

GetMembers() public méthode

public GetMembers ( BindingFlags bindingAttr ) : MemberInfo[]
bindingAttr BindingFlags
Résultat MemberInfo[]

GetMethod() public méthode

public GetMethod ( string name, BindingFlags bindingAttr ) : MethodInfo
name string
bindingAttr BindingFlags
Résultat System.Reflection.MethodInfo

GetMethod() public méthode

public GetMethod ( string name, BindingFlags bindingAttr, Binder binder, Type types, ParameterModifier modifiers ) : MethodInfo
name string
bindingAttr BindingFlags
binder System.Reflection.Binder
types System.Type
modifiers System.Reflection.ParameterModifier
Résultat System.Reflection.MethodInfo

GetMethods() public méthode

public GetMethods ( BindingFlags bindingAttr ) : System.Reflection.MethodInfo[]
bindingAttr BindingFlags
Résultat System.Reflection.MethodInfo[]

GetProperties() public méthode

public GetProperties ( BindingFlags bindingAttr ) : System.Reflection.PropertyInfo[]
bindingAttr BindingFlags
Résultat System.Reflection.PropertyInfo[]

GetProperty() public méthode

public GetProperty ( string name, BindingFlags bindingAttr ) : PropertyInfo
name string
bindingAttr BindingFlags
Résultat System.Reflection.PropertyInfo

GetProperty() public méthode

public GetProperty ( string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type types, ParameterModifier modifiers ) : PropertyInfo
name string
bindingAttr BindingFlags
binder System.Reflection.Binder
returnType System.Type
types System.Type
modifiers System.Reflection.ParameterModifier
Résultat System.Reflection.PropertyInfo

InvokeMember() public méthode

public InvokeMember ( string name, BindingFlags invokeAttr, Binder binder, object target, object args, ParameterModifier modifiers, CultureInfo culture, string namedParameters ) : object
name string
invokeAttr BindingFlags
binder System.Reflection.Binder
target object
args object
modifiers System.Reflection.ParameterModifier
culture System.Globalization.CultureInfo
namedParameters string
Résultat object

RemoveHandler() public méthode

public RemoveHandler ( int dispid, object func ) : void
dispid int
func object
Résultat void