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); }
protected Message() { _parameters = new ParameterCollection(); _identity = GetMessageIdentity(this.GetType()); }