示例#1
0
 protected T GetMessage <T>(ServiceContextKey key)
 {
     if (this.Messages != null && this.Messages.ContainsKey(key) && this.Messages[key] is T)
     {
         return((T)this.Messages[key]);
     }
     return(default(T));
 }
示例#2
0
 public ContextMessage(ServiceContextKey key, object instance)
 {
     this.Key      = key;
     this.Instance = instance;
 }