示例#1
0
 bool SentByThis(ExportsChangeEventArgs e)
 {
     return(e is TaggedExportsChangedEventArgs &&
            ((TaggedExportsChangedEventArgs)e).Sender == this);
 }
示例#2
0
 private void ExportProvider_ExportsChanged([CanBeNull] object sender, [CanBeNull] ExportsChangeEventArgs e)
 {
     UpdateTarget();
 }
 /// <summary>
 /// Determines if the specified event arguments were sent by this instance.
 /// </summary>
 /// <param name="e">The event arguments.</param>
 /// <returns>True if the specified event arguments were sent by this instance, otherwise false.</returns>
 private bool SelfSent(ExportsChangeEventArgs e)
 {
     return(e is TaggedExportsChangeEventArgs &&
            ((TaggedExportsChangeEventArgs)e).Sender == this);
 }
示例#4
0
 private static void Container_ExportsChanged(object sender, ExportsChangeEventArgs e)
 {
     Console.Write("Added Exports: ");
     Console.WriteLine(string.Join(", ", e.AddedExports));
 }
示例#5
0
 private void ExportProvider_ExportsChanged(object?sender, ExportsChangeEventArgs e)
 {
     ExportsChanged?.Invoke(sender, e);
 }
示例#6
0
 private void OnContainerExportsChanged(object sender, ExportsChangeEventArgs e)
 {
     ExportsChanged?.Invoke(this, e);
 }
示例#7
0
 void provider_ExportsChanged(object sender, ExportsChangeEventArgs args)
 {
     Contract.Requires <ArgumentNullException>(sender != null);
     Contract.Requires <ArgumentNullException>(args != null);
     OnExportsChanged(args);
 }