62 references to BinaryFormatter
BinaryFormatTests (10)
FormatTests\Common\SerializationTest.cs (1)
19BinaryFormatter formatter = new()
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)
23BinaryFormatter 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. 61BinaryFormatter 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. 86BinaryFormatter 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.Framework (2)
BinaryTranslator.cs (2)
508BinaryFormatter formatter = new BinaryFormatter(); 1209BinaryFormatter formatter = new BinaryFormatter();
MSBuildTaskHost (2)
BinaryTranslator.cs (2)
508BinaryFormatter formatter = new BinaryFormatter(); 1209BinaryFormatter formatter = new BinaryFormatter();
PresentationCore (2)
System\Windows\dataobject.cs (2)
1685formatter = new BinaryFormatter(); 3054formatter = new BinaryFormatter();
PresentationCore.Tests (7)
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\BinaryFormatterScope.cs (1)
40BinaryFormatter formatter = new();
TestUtilities\BinaryFormatTestExtensions.cs (1)
26BinaryFormatter formatter = new();
PresentationFramework (1)
MS\Internal\DataStreams.cs (1)
393_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.TestUtilities (2)
BinarySerialization.cs (2)
78BinaryFormatter binaryFormatter = new() // CodeQL [SM04191] : Safe use because the deserialization process is performed on trusted data and the types are controlled and validated. 106BinaryFormatter binaryFormatter = 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 (8)
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\OLE\DataObject.Composition.BinaryFormatUtilities.cs (2)
63new BinaryFormatter().Serialize(stream, data); 229return new BinaryFormatter()
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)
50BinaryFormatter formatter = new();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (1)
690BinaryFormatter formatter = new();
System\ComponentModel\Design\Serialization\CodeDomSerializerExceptionTests.cs (1)
93BinaryFormatter formatter = new();
System.Windows.Forms.Primitives.TestUtilities (1)
System\Windows\Forms\BinaryFormat\BinaryFormatTestExtensions.cs (1)
30BinaryFormatter formatter = new();
System.Windows.Forms.Tests (10)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
70BinaryFormatter binaryFormatter = new() { Binder = new JsonDataTestDataBinder() }; 153BinaryFormatter 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)
444BinaryFormatter 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)
1788BinaryFormatter 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. 1818BinaryFormatter 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. 1840BinaryFormatter 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)
1341BinaryFormatter 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)
583BinaryFormatter 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. 584new BinaryFormatter().Serialize(stream, subItem);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (1)
117BinaryFormatter 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.