61 references to new
BinaryFormatTests (9)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (3)
27BinaryFormatter formatter = new(); 46BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 80BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
FormatTests\FormattedObject\HashTableTests.cs (1)
104BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
FormatTests\FormattedObject\ListTests.cs (1)
63BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
FormatTests\FormattedObject\PrimitiveTypeTests.cs (1)
100BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
SerializationRecordExtensionsTests.cs (3)
24BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 62BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 87BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
Microsoft.Build.Tasks.Core (1)
GenerateResource.cs (1)
2007BinaryFormatter binaryFormatter = new();
PresentationCore (2)
System\Windows\dataobject.cs (2)
1681formatter = new BinaryFormatter(); 3025formatter = new BinaryFormatter();
PresentationCore.Tests (6)
BinaryFormat\BinaryFormatWriterTests.cs (2)
26BinaryFormatter formatter = new(); 42BinaryFormatter formatter = new();
BinaryFormat\HashTableTests.cs (1)
105BinaryFormatter formatter = new();
BinaryFormat\ListTests.cs (1)
81BinaryFormatter formatter = new();
BinaryFormat\PrimitiveTypeTests.cs (1)
96BinaryFormatter formatter = new();
TestUtilities\BinaryFormatTestExtensions.cs (1)
26BinaryFormatter formatter = new();
PresentationFramework (1)
MS\Internal\DataStreams.cs (1)
390_formatter = new BinaryFormatter();
System.ComponentModel.TypeConverter (2)
System\ComponentModel\Design\DesigntimeLicenseContextSerializer.cs (2)
58var formatter = new BinaryFormatter(); 140var formatter = new BinaryFormatter();
System.Configuration.ConfigurationManager (3)
System\Configuration\SettingsPropertyValue.cs (3)
99value = (new BinaryFormatter()).Deserialize(ms); 195return (new BinaryFormatter()).Deserialize(ms); 234BinaryFormatter bf = new BinaryFormatter();
System.Private.Windows.Core (2)
System\Private\Windows\Ole\BinaryFormatUtilities.cs (2)
62new BinaryFormatter().Serialize(stream, data); 201value = new BinaryFormatter()
System.Private.Windows.Core.Tests (5)
System\Private\Windows\Nrbf\BinaryFormatterHelpers.cs (4)
40formatter = new(); 70BinaryFormatter formatter = new() 104BinaryFormatter binaryFormatter = new() 135new BinaryFormatter().Serialize(stream, @object);
System\Private\Windows\Nrbf\CoreNrbfSerializerTests.cs (1)
47new BinaryFormatter().Serialize(stream, input);
System.Private.Windows.Core.TestUtilities (2)
BinarySerialization.cs (2)
120BinaryFormatter formatter = new() // CodeQL [SM04191]: Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 147BinaryFormatter formatter = new() // CodeQL [SM04191]: Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
System.Resources.Extensions (1)
System\Resources\Extensions\DeserializingResourceReader.cs (1)
49BinaryFormatter? formatter = new()
System.Windows.Forms (6)
System\Resources\ResXDataNode.cs (2)
293binaryFormatter ??= new BinaryFormatter 445_binaryFormatter ??= new BinaryFormatter
System\Windows\Forms\ActiveX\AxHost.PropertyBagStream.cs (2)
49_bag = (Hashtable)new BinaryFormatter().Deserialize(stream); // CodeQL[SM03722, SM04191] : BinaryFormatter is intended to be used as a fallback for unsupported types. Users must explicitly opt into this behavior" 118new BinaryFormatter().Serialize(stream, _bag);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
1152deserialized = new BinaryFormatter().Deserialize(stream); // CodeQL[SM03722, SM04191] : BinaryFormatter is intended to be used as a fallback for unsupported types. Users must explicitly opt into this behavior 1538new BinaryFormatter().Serialize(stream, sourceValue);
System.Windows.Forms.Design (8)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (2)
167new BinaryFormatter().Serialize(_resourceStream, _resources.Data); 233Hashtable? resources = new BinaryFormatter().Deserialize(_resourceStream) as Hashtable; // CodeQL[SM03722, SM04191] : The operation is essential for the design experience when users are running their own designers they have created. This cannot be achieved without BinaryFormatter
System\Windows\Forms\Design\CommandSet.cs (3)
1411new BinaryFormatter().Serialize(stream, serializationData); 1456new BinaryFormatter().Serialize(stream, serializationData); 1871object serializationData = new BinaryFormatter().Deserialize(s); // CodeQL[SM03722, SM04191] : The operation is essential for the design experience when users are running their own designers they have created. This cannot be achieved without BinaryFormatter
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (3)
54new BinaryFormatter().Serialize(_serializationStream, sd); 144return new BinaryFormatter().Deserialize(SerializationStream); // CodeQL[SM03722, SM04191] : The operation is essential for the design experience when users are running their own designers they have created. This cannot be achieved without BinaryFormatter 220_serializationData ??= new BinaryFormatter().Deserialize(SerializationStream!); // CodeQL[SM03722, SM04191] : The operation is essential for the design experience when users are running their own designers they have created. This cannot be achieved without BinaryFormatter
System.Windows.Forms.Design.Tests (3)
System\ComponentModel\Design\ExceptionCollectionTests.cs (1)
52BinaryFormatter formatter = new();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (1)
694BinaryFormatter formatter = new();
System\ComponentModel\Design\Serialization\CodeDomSerializerExceptionTests.cs (1)
95BinaryFormatter formatter = new();
System.Windows.Forms.Tests (10)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
79BinaryFormatter binaryFormatter = new() { Binder = new JsonDataTestDataBinder() }; 164BinaryFormatter binaryFormat = new(); // CodeQL [SM04191] This is a test deserialization process is performed on trusted data and the types are controlled and validated.
System\Windows\Forms\ImageListTests.cs (1)
446BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (3)
1790BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 1820BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 1842BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
System\Windows\Forms\ListViewGroupTests.cs (1)
1343BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.
System\Windows\Forms\ListViewSubItemTests.cs (2)
585BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 586new BinaryFormatter().Serialize(stream, subItem);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (1)
119BinaryFormatter formatter = new(); // CodeQL [SM04191] : This is a test. Safe use because the deserialization process is performed on trusted data and the types are controlled and validated.