Пример #1
0
        public static AlbionParser AddResponseHandler <TOperation>(this AlbionParser albionParser, OperationCodes operationCode, Action <TOperation> action) where TOperation : BaseOperation
        {
            var handler = new ResponseHandler <TOperation>(operationCode, action);

            albionParser.AddHandler(handler);

            return(albionParser);
        }
Пример #2
0
        public static AlbionParser AddEventHandler <TEvent>(this AlbionParser albionParser, EventCodes eventCode, Action <TEvent> action) where TEvent : BaseEvent
        {
            var handler = new EventHandler <TEvent>(eventCode, action);

            albionParser.AddHandler(handler);

            return(albionParser);
        }