Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
QuestionHow To? Abstract base class with Generic Constraints that also implements other interfaces Pin
Foothill2-Mar-16 8:46
professionalFoothill2-Mar-16 8:46 
AnswerRe: How To? Abstract base class with Generic Constraints that also implements other interfaces Pin
Sascha Lefèvre2-Mar-16 9:14
professionalSascha Lefèvre2-Mar-16 9:14 
GeneralRe: How To? Abstract base class with Generic Constraints that also implements other interfaces Pin
Foothill2-Mar-16 9:22
professionalFoothill2-Mar-16 9:22 
GeneralRe: How To? Abstract base class with Generic Constraints that also implements other interfaces Pin
Sascha Lefèvre2-Mar-16 9:33
professionalSascha Lefèvre2-Mar-16 9:33 
QuestionHow to preview office file in windows app 8.1 using C# Pin
Shaimaa Fawzy2-Mar-16 4:16
Shaimaa Fawzy2-Mar-16 4:16 
AnswerRe: How to preview office file in windows app 8.1 using C# Pin
Frank Kerrigan4-Mar-16 3:52
Frank Kerrigan4-Mar-16 3:52 
GeneralRe: How to preview office file in windows app 8.1 using C# Pin
Shaimaa Fawzy5-Mar-16 5:53
Shaimaa Fawzy5-Mar-16 5:53 
QuestionObserver Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 0:54
Bernhard Hiller2-Mar-16 0:54 
When an object A needs to know that something "interesting" happened in object B, object B has an event for that, and A can subscribe to that event. Works well if A and B reside in the same program.
Now imagine A on one computer, and B on a different computer, connected with a not so stable wireless network. Of course, events can be sent via .Net Remoting or WCF. But things become naughty when the connection breaks. .Net Remoting may automatically re-establish the connection, WCF is more of a WTF here.
But anyway, we want B to make sure that the event was sent to all subscribers, and try to send it until it eventually succeeds.
Are there any components available which wrap those extra concerns or do we need to write our own "events" (including the subscription/unsubscription process, sending with a list of pending subscribers, connection fault handling) here? Or would you prefer a different architecture (e.g. A polls the state of B)?
Edit:
Let me create an example for that scenario. We have to take care of a flock of sheep. A shepherding drone is hovering over the area and searching for wolves. After detection of a wolf, it will notify the dogs and tell them where the wolves are etc. In most case there is one drone and one dog, but sometimes there may be many. With some trees around, the connection between the drone and the network may get disrupted.
An alternative solution is the dogs querying the drone's LastWolfDetected property in short intervals. Or the drones sending the LastWolfDetected message to a server, and the dogs query the server.
Anyway, the dogs must be informed reliably.

modified 3-Mar-16 3:18am.

QuestionRe: Observer Pattern with Remote Machines Pin
dan!sh 2-Mar-16 1:42
professional dan!sh 2-Mar-16 1:42 
AnswerRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 2:58
Bernhard Hiller2-Mar-16 2:58 
GeneralRe: Observer Pattern with Remote Machines Pin
Sascha Lefèvre2-Mar-16 3:39
professionalSascha Lefèvre2-Mar-16 3:39 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 20:54
Bernhard Hiller2-Mar-16 20:54 
GeneralRe: Observer Pattern with Remote Machines Pin
dan!sh 2-Mar-16 23:00
professional dan!sh 2-Mar-16 23:00 
AnswerRe: Observer Pattern with Remote Machines Pin
Pete O'Hanlon2-Mar-16 5:52
mvePete O'Hanlon2-Mar-16 5:52 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 20:58
Bernhard Hiller2-Mar-16 20:58 
GeneralRe: Observer Pattern with Remote Machines Pin
Pete O'Hanlon2-Mar-16 21:08
mvePete O'Hanlon2-Mar-16 21:08 
AnswerRe: Observer Pattern with Remote Machines Pin
BillWoodruff2-Mar-16 6:43
professionalBillWoodruff2-Mar-16 6:43 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 21:24
Bernhard Hiller2-Mar-16 21:24 
AnswerRe: Observer Pattern with Remote Machines Pin
BillWoodruff2-Mar-16 21:54
professionalBillWoodruff2-Mar-16 21:54 
AnswerRe: Observer Pattern with Remote Machines Pin
Super Lloyd5-Mar-16 19:01
Super Lloyd5-Mar-16 19:01 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller6-Mar-16 21:30
Bernhard Hiller6-Mar-16 21:30 
GeneralRe: Observer Pattern with Remote Machines Pin
Super Lloyd6-Mar-16 23:04
Super Lloyd6-Mar-16 23:04 
QuestionReflection for non public type in Unit Testing Pin
Member 91405151-Mar-16 18:23
Member 91405151-Mar-16 18:23 
AnswerRe: Reflection for non public type in Unit Testing Pin
Bernhard Hiller1-Mar-16 21:26
Bernhard Hiller1-Mar-16 21:26 
GeneralRe: Reflection for non public type in Unit Testing Pin
Member 91405152-Mar-16 19:18
Member 91405152-Mar-16 19:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.