Ejemplo n.º 1
0
        private static DrainNodeGateContext GetDrainNodeGateContext(WebFarmContext webFarmContext)
        {
            lock (sm_lock)
            {
                DrainNodeGateContext state = webFarmContext.StateTable.GetState <DrainNodeGateContext>();

                if (state == null)
                {
                    var config = Helpers.GetConfigSettings(webFarmContext.Name);

                    state = new DrainNodeGateContext(config);

                    webFarmContext.StateTable.SetState(state);
                }

                return(state);
            }
        }
 public static void TraceVerbose(this WebFarmContext context, string format, params object[] args)
 {
     context.Trace(TraceLevel.Verbose, format, args);
 }
 public static void TraceError(this WebFarmContext context, string format, params object[] args)
 {
     context.Trace(TraceLevel.Error, format, args);
 }
 public static void Trace(this WebFarmContext context, System.Diagnostics.TraceLevel level, string format, params object[] args)
 {
     context.TraceMessage(new TraceMessage(level, string.Format(format, args)));
 }