任务命令模式与模式等通知观察器一起使用 [英] Task Command Pattern is used with a notification observer like pattern
问题描述
我正在寻找一种使用通知系统实现任务系统的好方法。
如果有人知道任何好的资源,我可以看一下处理和组合这两种模式。
我很抱歉,我没有任何示例代码,但一旦我知道如何实现我会发布一些代码。
我有三个界面:
IProgram
Attach();
Detatch();
通知();
ITask
执行();
INotify
更新();
一个事件:
NotifyEventArgs
课程:
Notifier
更新()
obserState
AbstractTask
NotifyEvent
执行();
TypesOfTask
FileProgram
GetState()
SetState()
subjectState
I am looking for a good way to implement a Task System with a Notification System.
If anyone is aware of any good resources I can look at for handling and combining both patterns.
I am sorry in advance, I do not have any sample code, but once I have a good idea how implement I will post some code.
I have three interface:
IProgram
Attach();
Detatch();
Notify();
ITask
Execute();
INotify
Update();
one Event:
NotifyEventArgs
Classes:
Notifier
Update()
obserState
AbstractTask
NotifyEvent
Execute();
TypesOfTask
FileProgram
GetState()
SetState()
subjectState
这些会让你开始吗?
C#NotificationCenter [ ^ ]
用C#编写的通知客户端和服务器 [ ^ ]
和
http://stackoverflow.com/questions/2267916/notification-model-pattern [ ^ ]
不确定这个,但你永远不会知道,直到你尝试:-)
http:/ /www.madleets.com/Thread-C-VB-NET-Madleets-Chatbox-Notification-Project [ ^ ]
记住模式非常好但是不能总是严格应用开箱即用 - 这个练习真正重要的一面是避免反模式 - 这是关于反模式和最差实践 [ ^ ]
Will these get you started?
C# NotificationCenter[^]
Notification Client and Server Written in C#[^]
and
http://stackoverflow.com/questions/2267916/notification-model-pattern[^]
Not sure about this one but you never know until you try :-)
http://www.madleets.com/Thread-C-VB-NET-Madleets-Chatbox-Notification-Project[^]
Remember patterns are (very) good but can't always be rigidly applied "out of the box" - the really important side to this exercise will be to avoid "anti-patterns" - here's another CP article on that Anti Patterns and Worst Practices[^]
这篇关于任务命令模式与模式等通知观察器一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!