Skip to content

Commit 7cef859

Browse files
committed
C#: Add sample code file that calls both supported and unsupported library code with respect to flow summaries.
1 parent 918a6c7 commit 7cef859

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
public class LibraryUsage
5+
{
6+
public void M1()
7+
{
8+
var l = new List<object>(); // Uninteresting parameterless constructor
9+
var o = new object(); // Uninteresting parameterless constructor
10+
l.Add(o); // Has flow summary
11+
l.Add(o); // Has flow summary
12+
}
13+
14+
public void M2()
15+
{
16+
var d0 = new DateTime(); // Uninteresting parameterless constructor
17+
var next0 = d0.AddYears(30); // Has no flow summary
18+
19+
var d1 = new DateTime(2000, 1, 1); // Interesting constructor
20+
var next1 = next0.AddDays(3); // Has no flow summary
21+
var next2 = next1.AddYears(5); // Has no flow summary
22+
}
23+
24+
public void M3()
25+
{
26+
var guid1 = Guid.Parse("{12345678-1234-1234-1234-123456789012}"); // Has no flow summary
27+
}
28+
}

0 commit comments

Comments
 (0)