Giter Club home page Giter Club logo

cesloi's Introduction

Called RF-Tar-Railt

mi no edar víl nihil

Who am i

ûnyr no min

  • A common university student
  • Anime
  • Python/C#/C++/Java
  • Conlanger: Nihila

Link

wakatime
Email | QQ | Bilibili | Twitter

Language

Statistic


cesloi's People

Contributors

rf-tar-railt avatar sourcery-ai-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sourcery-ai-bot

cesloi's Issues

command有问题

当函数不要求获取messageChain时command_handle是收不到事件可能传递的message的
或考虑在将事件参数传递给函数前先经过command_handle

Publisher的作用或许要提高一些

Cesloi 的事件系统是用的”发布--订阅“模型

在C#中,事件在类中声明且生成,且通过使用同一个类或其他类中的委托与事件处理程序关联。包含事件的类用于发布事件。这被称为 发布器(publisher) 类。其他接受该事件的类被称为 订阅器(subscriber) 类。事件使用 发布-订阅(publisher-subscriber) 模型。此处的委托(delegate)相当于一类拥有相同参数类型与返回值类型的方法的统称。

发布器(publisher) 是一个包含事件和委托定义的对象。事件和委托之间的联系也定义在这个对象中。发布器(publisher)类的对象调用这个事件,并通知其他的对象。

订阅器(subscriber) 是一个接受事件并提供事件处理程序的对象。在发布器(publisher)类中的委托调用订阅器(subscriber)类中的方法(事件处理程序)。一个事件可以处理多个经过委托注册的订阅器类中的方法。

对应此处的Cesloi的delegatesystem,Publisher类包含订阅器列表 (Subscriber List) 与绑定事件类型 (Bind Event), 而委托则扩大为EventDelegate,用来处理所有的订阅器类中的事件处理程序(Callable Function)。

如果可行,那么是否可以将委托的概念缩小,塞入发布器类中?
通信模块收到来自api的事件消息,根据类型传递给相应发布器中的委托进行数据分析,再由委托将分析好的参数值传递给订阅器中的处理程序

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.