3 instantiations of EventRegistrationToken
mscorlib (3)
system\runtime\interopservices\windowsruntime\eventregistrationtokentable.cs (3)
69
return new
EventRegistrationToken
(0);
87
token = new
EventRegistrationToken
(token.Value + 1);
173
return new
EventRegistrationToken
(tokenValue);
95 references to EventRegistrationToken
mscorlib (62)
system\reflection\eventinfo.cs (2)
126
if (addMethod.ReturnType == typeof(System.Runtime.InteropServices.WindowsRuntime.
EventRegistrationToken
))
149
if (parameters[0].ParameterType == typeof(System.Runtime.InteropServices.WindowsRuntime.
EventRegistrationToken
))
system\runtime\interopservices\windowsruntime\eventregistrationtoken.cs (6)
32
public static bool operator ==(
EventRegistrationToken
left,
EventRegistrationToken
right)
37
public static bool operator !=(
EventRegistrationToken
left,
EventRegistrationToken
right)
44
if (!(obj is
EventRegistrationToken
))
49
return ((
EventRegistrationToken
)obj).Value == Value;
system\runtime\interopservices\windowsruntime\eventregistrationtokentable.cs (11)
23
private Dictionary<
EventRegistrationToken
, T> m_tokens = new Dictionary<
EventRegistrationToken
, T>();
64
public
EventRegistrationToken
AddEventHandler(T handler)
78
private
EventRegistrationToken
AddEventHandlerNoLock(T handler)
84
EventRegistrationToken
token = GetPreferredToken(handler);
103
internal T ExtractHandler(
EventRegistrationToken
token)
132
private static
EventRegistrationToken
GetPreferredToken(T handler)
176
public void RemoveEventHandler(
EventRegistrationToken
token)
205
EventRegistrationToken
preferredToken = GetPreferredToken(handler);
218
foreach (KeyValuePair<
EventRegistrationToken
, T> registration in m_tokens)
236
private void RemoveEventHandlerNoLock(
EventRegistrationToken
token)
system\runtime\interopservices\windowsruntime\windowsruntimemarshal.cs (39)
31
public static void AddEventHandler<T>(Func<T,
EventRegistrationToken
> addMethod,
32
Action<
EventRegistrationToken
> removeMethod,
62
public static void RemoveEventHandler<T>(Action<
EventRegistrationToken
> removeMethod, T handler)
87
public static void RemoveAllEventHandlers(Action<
EventRegistrationToken
> removeMethod)
135
private
EventRegistrationToken
firstToken; // Optimization for common case where there is only one token
136
private List<
EventRegistrationToken
> restTokens; // Rest of the tokens
138
internal EventRegistrationTokenList(
EventRegistrationToken
token)
153
public bool Push(
EventRegistrationToken
token)
159
restTokens = new List<
EventRegistrationToken
>();
170
public bool Pop(out
EventRegistrationToken
token)
186
public void CopyTo(List<
EventRegistrationToken
> tokens)
228
internal static void AddEventHandler<T>(Func<T,
EventRegistrationToken
> addMethod,
229
Action<
EventRegistrationToken
> removeMethod,
238
EventRegistrationToken
token = addMethod(handler);
261
private static Dictionary<object, EventRegistrationTokenList> GetEventRegistrationTokenTable(object instance, Action<
EventRegistrationToken
> removeMethod)
288
internal static void RemoveEventHandler<T>(Action<
EventRegistrationToken
> removeMethod, T handler)
294
EventRegistrationToken
token;
330
internal static void RemoveAllEventHandlers(Action<
EventRegistrationToken
> removeMethod)
337
List<
EventRegistrationToken
> tokensToRemove = new List<
EventRegistrationToken
>();
411
internal EventRegistrationTokenListWithCount(TokenListCount tokenListCount,
EventRegistrationToken
token)
430
public void Push(
EventRegistrationToken
token)
437
public bool Pop(out
EventRegistrationToken
token)
442
public void CopyTo(List<
EventRegistrationToken
> tokens)
546
private static object GetInstanceKey(Action<
EventRegistrationToken
> removeMethod)
558
internal static void AddEventHandler<T>(Func<T,
EventRegistrationToken
> addMethod,
559
Action<
EventRegistrationToken
> removeMethod,
569
EventRegistrationToken
token = addMethod(handler);
638
private static ConditionalWeakTable<object, EventRegistrationTokenListWithCount> GetEventRegistrationTokenTableNoCreate(object instance, Action<
EventRegistrationToken
> removeMethod, out TokenListCount tokenListCount)
646
private static ConditionalWeakTable<object, EventRegistrationTokenListWithCount> GetOrCreateEventRegistrationTokenTable(object instance, Action<
EventRegistrationToken
> removeMethod, out TokenListCount tokenListCount)
655
private static ConditionalWeakTable<object, EventRegistrationTokenListWithCount> GetEventRegistrationTokenTableInternal(object instance, Action<
EventRegistrationToken
> removeMethod, out TokenListCount tokenListCount, bool createIfNotFound)
693
internal static void RemoveEventHandler<T>(Action<
EventRegistrationToken
> removeMethod, T handler)
697
EventRegistrationToken
token;
770
internal static void RemoveAllEventHandlers(Action<
EventRegistrationToken
> removeMethod)
774
List<
EventRegistrationToken
> tokensToRemove = new List<
EventRegistrationToken
>();
1028
internal static void CallRemoveMethods(Action<
EventRegistrationToken
> removeMethod, List<
EventRegistrationToken
> tokensToRemove)
1033
foreach (
EventRegistrationToken
token in tokensToRemove)
system\threading\Tasks\AsyncCausalityTracer.cs (2)
155
EventRegistrationToken
token = s_TracerFactory.add_TracingStatusChanged(new EventHandler<WFD.TracingStatusChangedEventArgs>(TracingStatusChangedHandler));
156
Contract.Assert(token != default(
EventRegistrationToken
), "EventRegistrationToken is null");
system\threading\Tasks\IAsyncCausalityTracerStatics.cs (2)
31
EventRegistrationToken
add_TracingStatusChanged(System.EventHandler<TracingStatusChangedEventArgs> eventHandler);
32
void remove_TracingStatusChanged(
EventRegistrationToken
token);
System (33)
compmod\system\collections\specialized\marshalinghelpers.cs (33)
47
EventRegistrationToken
add_CollectionChanged(NotifyCollectionChangedEventHandler value);
48
void remove_CollectionChanged(
EventRegistrationToken
token);
57
EventRegistrationToken
add_PropertyChanged(PropertyChangedEventHandler value);
58
void remove_PropertyChanged(
EventRegistrationToken
token);
67
EventRegistrationToken
add_CanExecuteChanged(EventHandler<object> value);
68
void remove_CanExecuteChanged(
EventRegistrationToken
token);
172
Func<NotifyCollectionChangedEventHandler,
EventRegistrationToken
> addMethod =
173
new Func<NotifyCollectionChangedEventHandler,
EventRegistrationToken
>(_this.add_CollectionChanged);
174
Action<
EventRegistrationToken
> removeMethod =
175
new Action<
EventRegistrationToken
>(_this.remove_CollectionChanged);
187
Action<
EventRegistrationToken
> removeMethod =
188
new Action<
EventRegistrationToken
>(_this.remove_CollectionChanged);
213
internal
EventRegistrationToken
add_CollectionChanged(NotifyCollectionChangedEventHandler value)
218
EventRegistrationToken
token = table.AddEventHandler(value);
226
internal void remove_CollectionChanged(
EventRegistrationToken
token)
258
Func<PropertyChangedEventHandler,
EventRegistrationToken
> addMethod =
259
new Func<PropertyChangedEventHandler,
EventRegistrationToken
>(_this.add_PropertyChanged);
260
Action<
EventRegistrationToken
> removeMethod =
261
new Action<
EventRegistrationToken
>(_this.remove_PropertyChanged);
273
Action<
EventRegistrationToken
> removeMethod =
274
new Action<
EventRegistrationToken
>(_this.remove_PropertyChanged);
299
internal
EventRegistrationToken
add_PropertyChanged(PropertyChangedEventHandler value)
304
EventRegistrationToken
token = table.AddEventHandler(value);
312
internal void remove_PropertyChanged(
EventRegistrationToken
token)
348
Func<EventHandler<object>,
EventRegistrationToken
> addMethod =
349
new Func<EventHandler<object>,
EventRegistrationToken
>(_this.add_CanExecuteChanged);
350
Action<
EventRegistrationToken
> removeMethod =
351
new Action<
EventRegistrationToken
>(_this.remove_CanExecuteChanged);
365
Action<
EventRegistrationToken
> removeMethod =
366
new Action<
EventRegistrationToken
>(_this.remove_CanExecuteChanged);
409
private
EventRegistrationToken
add_CanExecuteChanged(EventHandler<object> value)
415
EventRegistrationToken
token = table.AddEventHandler(handler);
422
private void remove_CanExecuteChanged(
EventRegistrationToken
token)