protected void ScheduleWithContext(SecurityContext context)
{
if (context == null)
{
throw Fx.Exception.ArgumentNull("context");
}
if (isScheduled)
{
throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
}
this.isScheduled = true;
this.context = context.CreateCopy();
ScheduleCallback(CallbackHelper.InvokeWithContextCallback);
}