1 type derived from CodeStatementCollection
System.Windows.Forms.Design (1)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
2821internal class OrderedCodeStatementCollection : CodeStatementCollection
20 instantiations of CodeStatementCollection
System.CodeDom (9)
System\CodeDom\CodeCatchClause.cs (1)
44public CodeStatementCollection Statements => _statements ??= new CodeStatementCollection();
System\CodeDom\CodeConditionStatement.cs (2)
25public CodeStatementCollection TrueStatements { get; } = new CodeStatementCollection(); 27public CodeStatementCollection FalseStatements { get; } = new CodeStatementCollection();
System\CodeDom\CodeIterationStatement.cs (1)
24public CodeStatementCollection Statements { get; } = new CodeStatementCollection();
System\CodeDom\CodeMemberMethod.cs (1)
9private readonly CodeStatementCollection _statements = new CodeStatementCollection();
System\CodeDom\CodeMemberProperty.cs (2)
49public CodeStatementCollection GetStatements { get; } = new CodeStatementCollection(); 51public CodeStatementCollection SetStatements { get; } = new CodeStatementCollection();
System\CodeDom\CodeTryCatchFinallyStatement.cs (2)
23public CodeStatementCollection TryStatements { get; } = new CodeStatementCollection(); 27public CodeStatementCollection FinallyStatements { get; } = new CodeStatementCollection();
System.Windows.Forms.Design (2)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
2391statements = new CodeStatementCollection
System\Windows\Forms\Design\DataGridViewRowCollectionCodeDomSerializer.cs (1)
44return new CodeStatementCollection();
System.Windows.Forms.Design.Tests (9)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (9)
141CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 155CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 243CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 345CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 390CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 441CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 487CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 531CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[] 580CodeDomHelpers.AssertEqualCodeStatementCollection(new CodeStatementCollection(new CodeStatement[]
125 references to CodeStatementCollection
System (1)
src\libraries\shims\System\ref\System.cs (1)
92[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.CodeDom.CodeStatementCollection))]
System.CodeDom (23)
Microsoft\CSharp\CSharpCodeGenerator.cs (3)
629private void GenerateStatements(CodeStatementCollection stmts) 951CodeStatementCollection falseStatements = e.FalseStatements; 1005CodeStatementCollection finallyStatements = e.FinallyStatements;
Microsoft\VisualBasic\VBCodeGenerator.cs (3)
1300CodeStatementCollection falseStatements = e.FalseStatements; 1329CodeStatementCollection finallyStatements = e.FinallyStatements; 2597private void GenerateVBStatements(CodeStatementCollection stms)
System\CodeDom\CodeCatchClause.cs (2)
8private CodeStatementCollection _statements; 44public CodeStatementCollection Statements => _statements ??= new CodeStatementCollection();
System\CodeDom\CodeConditionStatement.cs (2)
25public CodeStatementCollection TrueStatements { get; } = new CodeStatementCollection(); 27public CodeStatementCollection FalseStatements { get; } = new CodeStatementCollection();
System\CodeDom\CodeIterationStatement.cs (1)
24public CodeStatementCollection Statements { get; } = new CodeStatementCollection();
System\CodeDom\CodeMemberMethod.cs (2)
9private readonly CodeStatementCollection _statements = new CodeStatementCollection(); 30public CodeStatementCollection Statements
System\CodeDom\CodeMemberProperty.cs (2)
49public CodeStatementCollection GetStatements { get; } = new CodeStatementCollection(); 51public CodeStatementCollection SetStatements { get; } = new CodeStatementCollection();
System\CodeDom\CodeStatementCollection.cs (2)
12public CodeStatementCollection(CodeStatementCollection value) 45public void AddRange(CodeStatementCollection value)
System\CodeDom\CodeTryCatchFinallyStatement.cs (2)
23public CodeStatementCollection TryStatements { get; } = new CodeStatementCollection(); 27public CodeStatementCollection FinallyStatements { get; } = new CodeStatementCollection();
System\CodeDom\Compiler\CodeGenerator.cs (1)
975protected void GenerateStatements(CodeStatementCollection stmts)
System\CodeDom\Compiler\CodeValidator.cs (3)
465private void ValidateStatements(CodeStatementCollection stmts) 507CodeStatementCollection falseStatements = e.FalseStatements; 528CodeStatementCollection finallyStatements = e.FinallyStatements;
System.Windows.Forms.Design (88)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomComponentSerializationState.cs (2)
20public readonly CodeStatementCollection? Context; 40CodeStatementCollection? ctxStatements,
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (9)
30private static void PopulateCompleteStatements(object? data, string name, CodeStatementCollection completeStatements, Dictionary<string, List<CodeExpression>> expressions) 37if (data is CodeStatementCollection statements) 70CodeStatementCollection completeStatements = []; 82CodeStatementCollection mappedStatements = []; 506CodeStatementCollection? ctxStatements = null; 508CodeStatementCollection extraStatements = []; 526if (extraStatements.Count > 0 && code is CodeStatementCollection existingStatements) 538CodeStatementCollection codeStatements = []; 567if (code is CodeStatementCollection existingStatements)
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (7)
55else if (codeObject is CodeStatementCollection statements) 87string supportedTypes = $"{nameof(CodeExpression)}, {nameof(CodeStatement)}, {nameof(CodeStatementCollection)}"; 168CodeStatementCollection statements = []; 227public virtual CodeStatementCollection SerializeMember(IDesignerSerializationManager manager, object owningObject, MemberDescriptor member) 233CodeStatementCollection statements = []; 263public virtual CodeStatementCollection SerializeMemberAbsolute(IDesignerSerializationManager manager, object owningObject, MemberDescriptor member) 269CodeStatementCollection statements;
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (12)
2100protected void SerializeEvent(IDesignerSerializationManager manager, CodeStatementCollection statements, object value, EventDescriptor descriptor) 2130protected void SerializeEvents(IDesignerSerializationManager manager, CodeStatementCollection statements, object value, params Attribute[]? filter) 2142protected void SerializeProperties(IDesignerSerializationManager manager, CodeStatementCollection statements, object value, Attribute[]? filter) 2194protected void SerializePropertiesToResources(IDesignerSerializationManager manager, CodeStatementCollection statements, object value, Attribute[]? filter) 2246protected void SerializeProperty(IDesignerSerializationManager manager, CodeStatementCollection statements, object value, PropertyDescriptor propertyToSerialize) 2342CodeStatementCollection? saveStatements = null; 2386CodeStatementCollection? statements = result as CodeStatementCollection; 2401saveStatements ??= manager.GetContext<CodeStatementCollection>(); 2544CodeStatementCollection? saveStatements = null; 2602internal static void FillStatementTable(IDesignerSerializationManager manager, IDictionary table, CodeStatementCollection statements) 2607internal static void FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary<string, string>? names, CodeStatementCollection statements, string? className)
System\ComponentModel\Design\Serialization\CodeMethodMap.cs (17)
13private CodeStatementCollection? _container; 14private CodeStatementCollection? _begin; 15private CodeStatementCollection? _end; 16private CodeStatementCollection? _statements; 17private CodeStatementCollection? _locals; 18private CodeStatementCollection? _fields; 19private CodeStatementCollection? _variables; 20private readonly CodeStatementCollection _targetStatements; 28internal CodeMethodMap(CodeStatementCollection targetStatements) 33internal CodeStatementCollection BeginStatements => _begin ??= []; 35internal CodeStatementCollection EndStatements => _end ??= []; 37internal CodeStatementCollection ContainerStatements => _container ??= []; 41internal CodeStatementCollection Statements => _statements ??= []; 43internal CodeStatementCollection LocalVariables => _locals ??= []; 45internal CodeStatementCollection FieldAssignments => _fields ??= []; 48internal CodeStatementCollection VariableAssignments => _variables ??= []; 50internal void Add(CodeStatementCollection statements)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (6)
192CodeStatementCollection? resultCollection = result as CodeStatementCollection; 468private CodeStatementCollection SerializeViaAdd( 474CodeStatementCollection statements = []; 553private CodeStatementCollection SerializeViaAddRange( 559CodeStatementCollection statements = [];
System\ComponentModel\Design\Serialization\ComponentCache.cs (1)
241public CodeStatementCollection Statements = [];
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (3)
104CodeStatementCollection? statements = null; 508private static void SerializeLoadComponentSettings(CodeStatementCollection statements, CodeExpression valueExpression) 527private static void SerializeSupportInitialize(CodeStatementCollection statements, CodeExpression valueExpression, string methodName)
System\ComponentModel\Design\Serialization\ContainerCodeDomSerializer.cs (1)
47CodeStatementCollection statements = [];
System\ComponentModel\Design\Serialization\EventMemberCodeDomSerializer.cs (1)
23public override void Serialize(IDesignerSerializationManager manager, object value, MemberDescriptor descriptor, CodeStatementCollection statements)
System\ComponentModel\Design\Serialization\LocalizationCodeDomSerializer.cs (3)
93CodeStatementCollection? statements = (CodeStatementCollection?)manager.Context[typeof(CodeStatementCollection)];
System\ComponentModel\Design\Serialization\MemberCodeDomSerializer.cs (1)
24CodeStatementCollection statements);
System\ComponentModel\Design\Serialization\PropertyMemberCodeDomSerializer.cs (5)
83public override void Serialize(IDesignerSerializationManager manager, object value, MemberDescriptor descriptor, CodeStatementCollection statements) 130private void SerializeContentProperty(IDesignerSerializationManager manager, object value, PropertyDescriptor property, bool isExtender, CodeStatementCollection statements) 204if (result is CodeStatementCollection csc) 224private void SerializeExtenderProperty(IDesignerSerializationManager manager, object value, PropertyDescriptor property, CodeStatementCollection statements) 282private void SerializeNormalProperty(IDesignerSerializationManager manager, object value, PropertyDescriptor property, CodeStatementCollection statements)
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (4)
80else if (codeObject is CodeStatementCollection statements) 111string supportedTypes = $"{nameof(CodeExpression)}, {nameof(CodeStatement)}, {nameof(CodeStatementCollection)}"; 273CodeStatementCollection? statements = manager.GetContext<CodeStatementCollection>();
System\ComponentModel\Design\Serialization\ResourcePropertyMemberCodeDomSerializer.cs (1)
29public override void Serialize(IDesignerSerializationManager manager, object value, MemberDescriptor descriptor, CodeStatementCollection statements)
System\ComponentModel\Design\Serialization\StatementContext.cs (4)
51private void AddOwner(object statementOwner, CodeStatementCollection? statements) 88public CodeStatementCollection? this[object statementOwner] 185public CodeStatementCollection? Statements; 186public TableEntry(object owner, CodeStatementCollection? statements)
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (3)
215private object? DeserializeName(IDesignerSerializationManager manager, string name, CodeStatementCollection? statements) 494CodeStatementCollection? statements = statementCtx.StatementCollection[member]; 516CodeStatementCollection? rootStatements = statementCtx.StatementCollection[root];
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (6)
187if (retVal is CodeStatementCollection csCollection) 337private void SerializeMethodInvocation(IDesignerSerializationManager manager, CodeStatementCollection statements, object control, string methodName, CodeExpressionCollection? parameters, Type[] paramTypes, StatementOrdering ordering) 378private void SerializePerformLayout(IDesignerSerializationManager manager, CodeStatementCollection statements, object control) 383private void SerializeResumeLayout(IDesignerSerializationManager manager, CodeStatementCollection statements, object control) 391private void SerializeSuspendLayout(IDesignerSerializationManager manager, CodeStatementCollection statements, object control) 400private void SerializeZOrder(IDesignerSerializationManager manager, CodeStatementCollection statements, Control control)
System\Windows\Forms\Design\ImageCollectionCodeDomSerializer.cs (1)
47if (codeObject is CodeStatementCollection codeStatementCollection)
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (1)
24CodeStatementCollection statements = [];
System.Windows.Forms.Design.Tests (13)
CodeDomHelpers.cs (2)
10public static void AssertEqualCodeStatementCollection(CodeStatementCollection expected, CodeStatementCollection actual)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (11)
151}), Assert.IsType<CodeStatementCollection>(valueState1.Code)); 165}), Assert.IsType<CodeStatementCollection>(valueState2.Code)); 253}), Assert.IsType<CodeStatementCollection>(valueState.Code)); 355}), Assert.IsType<CodeStatementCollection>(valueState.Code)); 400}), Assert.IsType<CodeStatementCollection>(valueState.Code)); 446}), Assert.IsType<CodeStatementCollection>(valueState.Code)); 492}), Assert.IsType<CodeStatementCollection>(valueState.Code)); 541}), Assert.IsType<CodeStatementCollection>(valueState.Code)); 590}), Assert.IsType<CodeStatementCollection>(valueState.Code)); 1704CodeStatementCollection state0 = (CodeStatementCollection)valueState[0];