What is the usage pattern for creating custom events?
1) Should we extend the classes that are already in the provided schema with
additional properties and methods?
2) Should we create a new hierarchy of classes based on BaseEvent,
CommonEvent, and DiagnosticEvent?
Also, if option two is the best usage pattern can the predefined events
provided (by Microsoft) in the schema be removed?
Steve Miller | Solution Developer
US - Central Region
Avanade Inc.
Highwoods Plaza II
103 Powell Court, Suite 130
Brentwood, TN 37027-5079
Office: 615.309.7000
Email: stevemi@avanade.com
David Keogh [MSFT] - 07 Nov 2003 16:26 GMT
Steve,
Our CommonEvent and DiagnosticEvent provide a bunch of context parameters
which are useful when building your own custom schema. So that's certainly
a valid starting place for creating your own events.
If you like the way we organized the standard events which sit on top of
those events, then extending them is the right thing to do. However, given
that we provide the full source code, you're fairly unlimited in terms of
what you can do.
It's also very possible to discard all the events, derive from BaseEvent
and build your own events from scratch. One reason is if you decide you
want a set of trace events which are much lighter weight (don't include the
10-15 properties which we normally put on all events).
So, in summary -- we don't have explicit rules about what the right thing
to do is in terms of schema customization. It really depends on your
requirements, and we're interested to know what folks end up doing in this
area, so we have a better idea of best practices for the future.
David [MSFT]
--------------------
| From: "Steve Miller" <stevemi@avanade.com>
| Subject: Creating a custom event schema question (the sequel).
[quoted text clipped - 37 lines]
|
| Email: stevemi@avanade.com