C#: Add sample code file that calls both supported and unsupported library code with respect to flow summaries.

This commit is contained in:
Michael Nebel
2022-03-07 14:57:15 +01:00
parent 918a6c7425
commit 7cef859253

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
public class LibraryUsage
{
public void M1()
{
var l = new List<object>(); // Uninteresting parameterless constructor
var o = new object(); // Uninteresting parameterless constructor
l.Add(o); // Has flow summary
l.Add(o); // Has flow summary
}
public void M2()
{
var d0 = new DateTime(); // Uninteresting parameterless constructor
var next0 = d0.AddYears(30); // Has no flow summary
var d1 = new DateTime(2000, 1, 1); // Interesting constructor
var next1 = next0.AddDays(3); // Has no flow summary
var next2 = next1.AddYears(5); // Has no flow summary
}
public void M3()
{
var guid1 = Guid.Parse("{12345678-1234-1234-1234-123456789012}"); // Has no flow summary
}
}