4 writes to Container
System.Windows.Forms.Design (1)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
205delegator.Manager.Container = container;
System.Windows.Forms.Design.Tests (3)
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (3)
89Container = value 95manager.Container = value; 105Assert.Throws<InvalidOperationException>(() => manager.Container = null);
19 references to Container
System.Windows.Forms.Design (13)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.PassThroughSerializationManager.cs (1)
70Manager.PreserveNames && Manager.Container?.Components[name] is not null && _resolved.Add(name))
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (12)
235if (instance is null && addToContainer && Container is not null) 237instance = Container.Components[name]; 259if (instance is null && addToContainer && typeof(IComponent).IsAssignableFrom(type) && (argArray is null || argArray.Length == 0 || (argArray.Length == 1 && argArray[0] == Container))) 261if (GetService(typeof(IDesignerHost)) is IDesignerHost host && host.Container == Container) 267if (Container.Components[name] is not null) 361if (addToContainer && instance is IComponent component && Container is not null) 367if (Container.Components[name] is not null) 375Container.Add(component); 379Container.Add(component, name); 540=> serviceType == typeof(IContainer) ? Container : _provider?.GetService(serviceType); 805if (instance is null && PreserveNames && Container is not null) 807instance = Container.Components[name];
System.Windows.Forms.Design.Tests (6)
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (6)
18Assert.Null(manager.Container); 60Assert.Same(expectedContainer, manager.Container); 61Assert.Same(manager.Container, manager.Container); 91Assert.Same(value, manager.Container); 96Assert.Same(value, manager.Container);