D. More Complex Examples: Connecting .NET Events to CAB Events, and Programmatic Subscriptions

  1. The tightly coupled .NET eventing system is used frequently throughout most .NET programs. It is often useful to be able to connect a tightly coupled .NET event to a loosely coupled CAB event so that firing the former also causes the firing of the latter.

    You can connect events declaratively, as shown on the facing page. The nonbold line of code beginning with public event is the declaration of an ordinary .NET event. The CAB attribute EventPublication, with which it is marked, tells the CAB Event Broker service, "Hey, I want you to subscribe to this .NET event, and when it is fired, I want you to fire this CAB event." You specify the string name of the ...

Get Programming Microsoft® Composite UI Application Block and Smart Client Software Factory now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.