public bool Exists(string name) { var principal = Thread.CurrentPrincipal as ThreadedPrincipal; return(principal?.Items.ContainsKey(name) ?? CallContext.LogicalGetData(name) != null); }