public static void LogicalSetData(String name, Object data) { IllogicalCallContext ilcc = Thread.CurrentThread.GetIllogicalCallContext(); ilcc.FreeNamedDataSlot(name); LogicalCallContext lcc = Thread.CurrentThread.GetLogicalCallContext(); lcc.SetData(name, data); }
/// <include file='doc\CallContext.uex' path='docs/doc[@for="CallContext.SetData"]/*' /> public static void SetData(String name, Object data) { if (data is ILogicalThreadAffinative) { IllogicalCallContext ilcc = Thread.CurrentThread.GetIllogicalCallContext(); ilcc.FreeNamedDataSlot(name); LogicalCallContext lcc = Thread.CurrentThread.GetLogicalCallContext(); lcc.SetData(name, data); } else { LogicalCallContext lcc = Thread.CurrentThread.GetLogicalCallContext(); lcc.FreeNamedDataSlot(name); IllogicalCallContext ilcc = Thread.CurrentThread.GetIllogicalCallContext(); ilcc.SetData(name, data); } }
internal static LogicalCallContext CreateLogicalCallContext(bool createEmpty) { LogicalCallContext ctx = null; if (logicalDatastore != null) { ctx = new LogicalCallContext(); foreach (DictionaryEntry entry in logicalDatastore) { ctx.SetData((string)entry.Key, entry.Value); } } if (ctx == null && createEmpty) { return(new LogicalCallContext()); } else { return(ctx); } }
internal static LogicalCallContext CreateLogicalCallContext (bool createEmpty) { LogicalCallContext ctx = null; if (logicalDatastore != null) { ctx = new LogicalCallContext (); foreach (DictionaryEntry entry in logicalDatastore) { ctx.SetData ((string)entry.Key, entry.Value); } } if (ctx == null && createEmpty) return new LogicalCallContext (); else return ctx; }
private static LogicalCallContext SetActivityIdInLogicalCallContext(LogicalCallContext logicalCallContext) { logicalCallContext.SetData("E2ETrace.ActivityID", DiagnosticTrace.ActivityId); return logicalCallContext; }
private void AddContextElementsToCallContext(LogicalCallContext callContext, IDictionary elements) { foreach (DictionaryEntry entry in elements) { callContext.SetData((string)entry.Key, new CorbaContextElement((string)entry.Value)); } }
void PopulateIdentity(LogicalCallContext callContext, String identity) { callContext.SetData(IdentityContextData.IdentityContext, new IdentityContextData(identity)); }
internal static LogicalCallContext CreateLogicalCallContext (bool createEmpty) { var lcc = Current._lcc; LogicalCallContext ctx = null; if (lcc != null && lcc.HasInfo) { ctx = new LogicalCallContext (); foreach (DictionaryEntry entry in lcc.Datastore) { ctx.SetData ((string)entry.Key, entry.Value); } } else if (createEmpty) ctx = new LogicalCallContext (); return ctx; }
private void PopulateIdentity(LogicalCallContext callContext, string identity) { callContext.SetData("__identitycontext__", new IdentityContextData(identity)); }