CommandBus

码农软件 · 软件分类 · 其他(Others) · 2019-07-18 12:58:24

软件介绍

一个轻量级的 Command Bus 的实现,用 Swift 编写。

使用:

{
    "{CommandNameA}": "{CommandHandlerNameA}",
    "{CommandNameB}": "{CommandHandlerNameB}",
    "{CommandNameC}": "{CommandHandlerNameC}"
}
class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        /*** Register to the Command event ***/
        NSNotificationCenter.defaultCenter().addObserver(self, selector: "onCommandHandled:", name:"COMMAND_DONE", object: nil)
        /*** Create the CommandBus ***/
        let commandBus: CommandBus = CommandBus(configurationFileName: "configuration")!
        /*** Create your own CommandHandler ***/
        let customCommand: CustomCommand = CustomCommand()
        /*** Send your commandHandler to the CommandBus with your event name ***/
        commandBus.handle(command: customCommand, commandHandledEvent: "COMMAND_DONE")
    }
    func onCommandHandled(notification: NSNotification) {
        /*** This method is called when the CommandHandler have done ***/
        print("Command Handled: \(notification.object!)")
    }
}


本文地址:https://codercto.com/soft/d/10400.html

小白学运营

小白学运营

刘异、伍斌、赵强 / 电子工业出版社 / 2015-9-1 / 49.00元

《小白学运营》是针对网络游戏行业,产品运营及数据分析工作的入门读物,主要为了帮助刚入行或有意从事游戏产品运营和数据分析的朋友。 《小白学运营》没有烦琐的理论阐述,更接地气。基础运营部分可以理解为入门新人的to do list;用户营销部分则是对用户管理的概述,从用户需求及体验出发,说明产品运营与用户管理的依附关系;数据分析实战中,侧重业务分析,着重阐述的是分析框架,以虚拟案例的方式进行陈述,......一起来看看 《小白学运营》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

在线进制转换器
在线进制转换器

各进制数互转换器

URL 编码/解码
URL 编码/解码

URL 编码/解码