2 implementations of Context
System.Windows.Forms.Design (2)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.PassThroughSerializationManager.cs (1)
21
ContextStack IDesignerSerializationManager.
Context
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
640
ContextStack IDesignerSerializationManager.
Context
117 references to Context
System.Windows.Forms.Design (98)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (4)
500
manager.
Context
.Push(statementCtx);
509
manager.
Context
.Push(extraStatements);
573
manager.
Context
.Pop();
646
manager.
Context
.Pop();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.PassThroughSerializationManager.cs (1)
23
get => ((IDesignerSerializationManager)Manager).
Context
;
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (6)
210
manager.
Context
.Push(abs);
217
Debug.Assert(manager.
Context
.Current == abs, "Serializer added a context it didn't remove.");
218
manager.
Context
.Pop();
271
manager.
Context
.Push(abs);
279
Debug.Assert(manager.
Context
.Current == abs, "Serializer added a context it didn't remove.");
280
manager.
Context
.Pop();
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (33)
407
manager.
Context
.Push(statement);
465
Debug.Assert(manager.
Context
.Current == statement, "Someone corrupted the context stack");
466
manager.
Context
.Pop();
1965
manager.
Context
.Push(newCtx);
1976
Debug.Assert(manager.
Context
.Current == newCtx, "Context stack corrupted.");
1977
manager.
Context
.Pop();
2108
manager.
Context
.Push(statements);
2109
manager.
Context
.Push(descriptor);
2121
Debug.Assert(manager.
Context
.Current == descriptor, "Context stack corrupted.");
2122
manager.
Context
.Pop();
2123
manager.
Context
.Pop();
2149
manager.
Context
.Push(inheritance);
2162
Debug.Assert(manager.
Context
.Current == inheritance, "Somebody messed up our context stack.");
2163
manager.
Context
.Pop();
2197
manager.
Context
.Push(statements);
2207
manager.
Context
.Push(tree);
2230
Debug.Assert(manager.
Context
.Current == tree, "Context stack corrupted.");
2231
manager.
Context
.Pop();
2238
Debug.Assert(manager.
Context
.Current == statements, "Context stack corrupted.");
2239
manager.
Context
.Pop();
2254
manager.
Context
.Push(statements);
2255
manager.
Context
.Push(propertyToSerialize);
2266
Debug.Assert(manager.
Context
.Current == propertyToSerialize, "Context stack corrupted.");
2267
manager.
Context
.Pop();
2268
manager.
Context
.Pop();
2360
manager.
Context
.Push(saveStatements);
2373
Debug.Assert(manager.
Context
.Current == saveStatements, "Context stack corrupted.");
2374
manager.
Context
.Pop();
2506
manager.
Context
.Append(table);
2554
manager.
Context
.Push(saveStatements);
2566
Debug.Assert(manager.
Context
.Current == saveStatements, "Context stack corrupted.");
2567
manager.
Context
.Pop();
2596
manager.
Context
.Append(table);
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (9)
424
manager.
Context
.Push(newContext);
435
Debug.Assert(manager.
Context
.Current == newContext, "Context stack corrupted.");
436
manager.
Context
.Pop();
518
manager.
Context
.Push(newCtx);
529
Debug.Assert(manager.
Context
.Current == newCtx, "Context stack corrupted.");
530
manager.
Context
.Pop();
594
manager.
Context
.Push(newContext);
605
Debug.Assert(manager.
Context
.Current == newContext, "Context stack corrupted.");
606
manager.
Context
.Pop();
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (10)
201
manager.
Context
.Push(value);
202
manager.
Context
.Push(statements);
417
manager.
Context
.Push(cache);
418
manager.
Context
.Push(entry);
454
Debug.Assert(manager.
Context
.Current == entry, "Context stack corrupted");
455
manager.
Context
.Pop();
456
manager.
Context
.Pop();
496
Debug.Assert(manager.
Context
.Current == statements, "Context stack corrupted");
497
manager.
Context
.Pop();
498
manager.
Context
.Pop();
System\ComponentModel\Design\Serialization\LocalizationCodeDomSerializer.cs (7)
49
ApplyMethodTable? table = (ApplyMethodTable?)manager.
Context
[typeof(ApplyMethodTable)];
54
manager.
Context
.Append(table);
66
PropertyDescriptor? descriptor = (PropertyDescriptor?)manager.
Context
[typeof(PropertyDescriptor)];
67
ExpressionContext? tree = (ExpressionContext?)manager.
Context
[typeof(ExpressionContext)];
93
CodeStatementCollection? statements = (CodeStatementCollection?)manager.
Context
[typeof(CodeStatementCollection)];
116
RootContext? rootContext = manager.
Context
[typeof(RootContext)] as RootContext;
129
ResourceManager? resourceManager = manager.
Context
[typeof(ResourceManager)] as ResourceManager;
System\ComponentModel\Design\Serialization\PropertyMemberCodeDomSerializer.cs (9)
181
manager.
Context
.Push(tree);
200
Debug.Assert(manager.
Context
.Current == tree, "Serializer added a context it didn't remove.");
201
manager.
Context
.Pop();
249
manager.
Context
.Push(tree);
260
Debug.Assert(manager.
Context
.Current == tree, "Context stack corrupted.");
261
manager.
Context
.Pop();
330
manager.
Context
.Push(tree);
341
Debug.Assert(manager.
Context
.Current == tree, "Context stack corrupted.");
342
manager.
Context
.Pop();
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (7)
217
manager.
Context
.Append(sm);
420
manager.
Context
.Push(re.PropertyDescriptor!);
421
manager.
Context
.Push(re.ExpressionContext!);
428
Debug.Assert(manager.
Context
.Current == re.ExpressionContext, "Someone corrupted the context stack");
429
manager.
Context
.Pop();
430
Debug.Assert(manager.
Context
.Current == re.PropertyDescriptor, "Someone corrupted the context stack");
431
manager.
Context
.Pop();
System\ComponentModel\Design\Serialization\ResourcePropertyMemberCodeDomSerializer.cs (2)
34
manager.
Context
.Push(_model);
42
manager.
Context
.Pop();
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (10)
89
manager.
Context
.Push(rootCtx);
202
Debug.Assert(manager.
Context
.Current == rootCtx, "Context stack corrupted");
204
manager.
Context
.Pop();
430
manager.
Context
.Push(docType);
431
manager.
Context
.Push(rootCtx);
432
manager.
Context
.Push(statementCtx);
465
Debug.Assert(manager.
Context
.Current == statementCtx, "Somebody messed up our context stack");
466
manager.
Context
.Pop();
467
manager.
Context
.Pop();
468
manager.
Context
.Pop();
System.Windows.Forms.Design.Tests (17)
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (17)
113
ContextStack context = iManager.
Context
;
115
Assert.Same(context, iManager.
Context
);
124
ContextStack context = iManager.
Context
;
126
Assert.Same(context, iManager.
Context
);
128
Assert.Throws<InvalidOperationException>(() => iManager.
Context
);
136
Assert.Throws<InvalidOperationException>(() => iManager.
Context
);
462
Assert.Throws<InvalidOperationException>(() => iManager.
Context
);
466
Assert.Throws<InvalidOperationException>(() => iManager.
Context
);
471
Assert.Throws<InvalidOperationException>(() => iManager.
Context
);
561
ContextStack stack1 = iManager.
Context
;
563
Assert.Same(stack1, iManager.
Context
);
568
ContextStack stack2 = iManager.
Context
;
570
Assert.Same(stack2, iManager.
Context
);
1742
ContextStack stack1 = iManager.
Context
;
1744
Assert.Same(stack1, iManager.
Context
);
1749
ContextStack stack2 = iManager.
Context
;
1751
Assert.Same(stack2, iManager.
Context
);
System.Windows.Forms.Primitives (2)
System\ComponentModel\Design\Serialization\DesignerSerializationManagerHelper.cs (2)
12
if (manager.
Context
[typeof(T)] is T contextTemp)
24
return manager.
Context
[typeof(T)] as T;