Пример #1
0
 public void implicitly_convertable_to_string()
 {
     var name = "message.name";
     var msg = new MessageName(name);
     string strMsg = msg;
     Assert.Equal(name, strMsg);
 }
		public MicroserviceMessageHandler(MessageName name, Type type, MethodInfo method, HandlerParameterDeserializer deserializer)
		{
			Name = name;
			_type = type;
			_method = method;
			_deserializer = deserializer;
		}
Пример #3
0
        public IMessageHandler First(MessageName name)
        {
            string search = "";
            foreach (var p in name.Parts)
            {
                if (search.Length == 0)
                    search += p;
                else search += "." + p;

                IMessageHandler result;
                if (_handlers.TryGetValue(search, out result))
                    return result;
            }

            throw new MicroservicesCoreException($"Handler '{name}' not found");
        }
Пример #4
0
 public Class1()
 {
     var name = new MessageName("asdf");
 }
Пример #5
0
 public ObjectBasedMessage(Type type, MessageName messageName, object message)
     : base(type,message)
 {
     Name = messageName;
 }
Пример #6
0
 public bool Equals(MessageName other)
 {
     return _name.Equals(other._name);
 }
 public FakeMsgHandler(MessageName name)
 {
     Name = name;
 }
Пример #8
0
 public Message(MessageName name, IMessageItem item)
 {
     _item = item;
     Name = name;
 }