<commit_before>//
//  ViewController.swift
//  CommandBus
//
//  Created by <NAME> on 09/10/2015.
//  Copyright © 2015 Ekhoo. All rights reserved.
//

import UIKit

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!)")
    }
    <commit_msg>Update the example<commit_after>//
//  ViewController.swift
//  CommandBus
//
//  Created by <NAME> on 09/10/2015.
//  Copyright © 2015 Ekhoo. All rights reserved.
//

import UIKit

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 Command ***/
        let customCommand: CustomCommand = CustomCommand()
        
        /*** Send your command 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!)")
    }
    
{'fraction_non_alphanumeric': 0.11529732183386292, 'fraction_numerical': 0.010894235133908307, 'mean_word_length': 2.7675213675213675, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4710878', 'n_tokens_mistral': 593, 'n_tokens_neox': 566, 'n_words': 162}