|
-
May 4th, 2012, 05:54 AM
#1
Thread Starter
PowerPoster
What is this diagram?

The above is an extract of a diagram I have (not made by me!)
But to those of you who understand, what does it show in terms of classes and interfaces and what derives from what and from which interfaces?
I want to hear your thoughts. This is potentially for a WCF contract. My thinking is that the contract will be the interface (IProductMessage)
it doesnt matter what this is trying to represent in terms of "real life" but just want to know what you think about the classes and structure and if it makes sense to you and if so, what it is.
Also, for data coming in to the WCF contract, how would it be possible to determine the concrete type of class from the above, if we are getting the IProductMessage? I guess there would be some internal logic to determine based on the "ProductHeader" perhaps on what type of class it is?
Anyway - your thoughts!
-
May 4th, 2012, 12:58 PM
#2
Re: What is this diagram?
Howdy,
This seems to be a class diagram (made in paint *cries*). Where the point of focus lies, is the IProductMessage. The lines without arrows seem to be indicating a 'using'-relation where the lines with arrows would be 'implements/extends'-relations. So every class with arrows coming from it in this diagram, implement the IProductMessage interface. And for example the InputProductReportMessage extends the abstract ProductReportBase class.
I can't tell you how you will be able to use these classes from the diagram just by looking at it. I haven't worked with WCF yet, so I'm clueless here, but perhaps somebody else has.
 Originally Posted by Techno
Also, for data coming in to the WCF contract, how would it be possible to determine the concrete type of class from the above, if we are getting the IProductMessage? I guess there would be some internal logic to determine based on the "ProductHeader" perhaps on what type of class it is?
To test for the given object's type or the type of one of it's ancestors you can use this:
Code:
if(msg is AlarmMessage)
Last edited by TheBigB; May 4th, 2012 at 01:03 PM.
Delete it. They just clutter threads anyway.
-
May 4th, 2012, 01:01 PM
#3
Thread Starter
PowerPoster
Re: What is this diagram?
true, there is that way of doing it too...
thanks! it helped
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|