示例#1
0
文件: Filter.cs 项目: dbremner/Cortex
 //TODO: Introduce code that just returns an encoded string
 //Since all that will be returned is the string itself and the
 //width and height; and an error code (potentially) why not just set it up as
 //such. I bet that the encoding of the hashtable isn't that efficient.
 public override Message Invoke(Message input)
 {
     Hashtable table = (Hashtable)input.Value;
       TranslateData(table);
       return new Message(Guid.NewGuid(), ObjectID, input.Sender,
       MessageOperationType.Return,
       Transform(table));
 }
示例#2
0
文件: Loader.cs 项目: dbremner/Cortex
 public Message Invoke(Message input)
 {
     return this[input.Receiver].Invoke(input);
 }
示例#3
0
文件: Plugin.cs 项目: dbremner/Cortex
 public abstract Message Invoke(Message input);
示例#4
0
文件: Node.cs 项目: dbremner/Cortex
 public virtual void OnSystemCall(Message incoming)
 {
     //do nothing
 }
示例#5
0
文件: Node.cs 项目: dbremner/Cortex
 public virtual void Receive(Message incoming)
 {
     switch(incoming.OperationType)
       {
     case MessageOperationType.Pass:
       OnPass(incoming);
       break;
     case MessageOperationType.Execute:
       OnExecute(incoming);
       break;
     case MessageOperationType.Return:
       OnReturn(incoming);
       break;
     case MessageOperationType.System:
       OnSystemCall(incoming);
       break;
     case MessageOperationType.Init:
       OnInit(incoming);
       break;
     case MessageOperationType.Failure:
       throw new ArgumentException(string.Format("Error: {0}", incoming.Value));
     default:
       DispatchTo(incoming.Sender, ObjectID, MessageOperationType.Failure, "Invalid Action Given");
       break;
       }
 }
示例#6
0
文件: Node.cs 项目: dbremner/Cortex
 public virtual void OnReturn(Message incoming)
 {
     //do nothing
 }
示例#7
0
文件: Node.cs 项目: dbremner/Cortex
 public virtual void OnPass(Message incoming)
 {
     //do nothing
 }
示例#8
0
文件: Node.cs 项目: dbremner/Cortex
 public virtual void OnInit(Message incoming)
 {
     //do nothing
 }
示例#9
0
文件: Node.cs 项目: dbremner/Cortex
 public virtual void OnExecute(Message incoming)
 {
     //do nothing
 }
示例#10
0
文件: Node.cs 项目: dbremner/Cortex
 public abstract void DispatchTo(Message mess);