20 references to SynchronizationContextMode
System.Web (20)
UI\Page.cs (4)
5723
if (SynchronizationContextUtil.CurrentMode ==
SynchronizationContextMode
.Legacy) {
5992
if (SynchronizationContextUtil.CurrentMode ==
SynchronizationContextMode
.Legacy) {
6118
if (SynchronizationContextUtil.CurrentMode ==
SynchronizationContextMode
.Legacy) {
6150
if (SynchronizationContextUtil.CurrentMode ==
SynchronizationContextMode
.Normal) {
UI\PageAsyncTask.cs (4)
29
internal PageAsyncTask(BeginEventHandler beginHandler, EndEventHandler endHandler, EndEventHandler timeoutHandler, Object state, bool executeInParallel,
SynchronizationContextMode
currentMode) {
39
SynchronizationContextUtil.ValidateMode(currentMode, requiredMode:
SynchronizationContextMode
.Legacy, specificErrorMessage: SR.SynchronizationContextUtil_PageAsyncTaskTimeoutHandlerParallelNotCompatible);
59
internal PageAsyncTask(Func<CancellationToken, Task> handler,
SynchronizationContextMode
currentMode) {
65
SynchronizationContextUtil.ValidateMode(currentMode, requiredMode:
SynchronizationContextMode
.Normal, specificErrorMessage: SR.SynchronizationContextUtil_TaskReturningPageAsyncMethodsNotCompatible);
UI\WebControls\ModelDataSourceView.cs (1)
320
if (!(_owner.DataControl.Page.IsAsync && SynchronizationContextUtil.CurrentMode !=
SynchronizationContextMode
.Legacy)) {
Util\SynchronizationContextUtil.cs (11)
13
public static
SynchronizationContextMode
CurrentMode {
15
return (!AppSettings.UseTaskFriendlySynchronizationContext) ?
SynchronizationContextMode
.Legacy :
SynchronizationContextMode
.Normal;
19
private static string FormatErrorMessage(string specificErrorMessage,
SynchronizationContextMode
requiredMode) {
25
if (HttpRuntime.TargetFramework < VersionUtil.Framework45 && requiredMode ==
SynchronizationContextMode
.Normal) {
29
else if (HttpRuntime.TargetFramework >= VersionUtil.Framework45 && requiredMode ==
SynchronizationContextMode
.Legacy) {
43
public static void ValidateMode(
SynchronizationContextMode
currentMode,
SynchronizationContextMode
requiredMode, string specificErrorMessage) {
54
requiredMode:
SynchronizationContextMode
.Legacy,
61
requiredMode:
SynchronizationContextMode
.Normal,
68
requiredMode:
SynchronizationContextMode
.Normal,