Esempio n. 1
0
        private static MessageIdentityDictionary CreateDictionary()
        {
            MessageIdentityDictionary dictionary = new MessageIdentityDictionary();
            Type mt = typeof(Message);

            Type[] at = Assembly.GetAssembly(mt).GetTypes();
            foreach (Type t in at)
            {
                if (mt.IsAssignableFrom(t))
                {
                    MessageIdentity identity = GetMessageIdentity(t);
                    if (identity.Command != Command.Undefined)
                    {
                        dictionary.Add(identity, t);
                    }
                }
            }
            return(dictionary);
        }
Esempio n. 2
0
 protected Message()
 {
     _parameters = new ParameterCollection();
     _identity   = GetMessageIdentity(this.GetType());
 }