mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
14 lines
323 B
C#
14 lines
323 B
C#
using System.Runtime.Serialization;
|
|
using System.IO;
|
|
using System;
|
|
|
|
class GoodXmlObjectSerializer
|
|
{
|
|
public static object Deserialize(Stream s)
|
|
{
|
|
// Good: type is hardcoded
|
|
XmlObjectSerializer ds = new DataContractSerializer(typeof(GoodXmlObjectSerializer));
|
|
return ds.ReadObject(s);
|
|
}
|
|
}
|