C#: Some test examples of collection like types that should be excluded.

This commit is contained in:
Michael Nebel
2022-08-24 15:05:15 +02:00
parent 4f5c06fed7
commit 83b3125dea
2 changed files with 47 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
namespace NoSummaries;
@@ -110,4 +111,24 @@ public abstract class BaseClass
// Negative summary.
public abstract string M2(string s);
}
// No methods in this class will have generated flow as
// the simple types used in the collection are not bulk data types.
public class CollectionFlow
{
public int[] ReturnSimpleTypeArray(int[] a)
{
return a;
}
public List<int> ReturnSimpleTypeList(List<int> a)
{
return a;
}
public Dictionary<int, int> ReturnSimpleTypeDictionary(Dictionary<int, int> a)
{
return a;
}
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
namespace Summaries;
@@ -85,6 +86,31 @@ public class CollectionFlow
{
return new List<string> { tainted };
}
public string[] ReturnComplexTypeArray(string[] a)
{
return a;
}
public List<byte> ReturnBulkTypeList(List<byte> a)
{
return a;
}
public Dictionary<int, string> ReturnComplexTypeDictionary(Dictionary<int, string> a)
{
return a;
}
public Array ReturnUntypedArray(Array a)
{
return a;
}
public IList ReturnUntypedList(IList a)
{
return a;
}
}
public class IEnumerableFlow