97 lines
4.0 KiB
C#
97 lines
4.0 KiB
C#
<Query Kind="Program">
|
|
<Reference><ProgramFilesX64>\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll</Reference>
|
|
<NuGetReference>Amazon.Lambda.S3Events</NuGetReference>
|
|
<NuGetReference>AWSSDK.Core</NuGetReference>
|
|
<NuGetReference>AWSSDK.S3</NuGetReference>
|
|
<Namespace>Amazon</Namespace>
|
|
<Namespace>Amazon.Auth.AccessControlPolicy</Namespace>
|
|
<Namespace>Amazon.Auth.AccessControlPolicy.ActionIdentifiers</Namespace>
|
|
<Namespace>Amazon.Internal</Namespace>
|
|
<Namespace>Amazon.Lambda.S3Events</Namespace>
|
|
<Namespace>Amazon.MissingTypes</Namespace>
|
|
<Namespace>Amazon.Runtime</Namespace>
|
|
<Namespace>Amazon.Runtime.CredentialManagement</Namespace>
|
|
<Namespace>Amazon.Runtime.CredentialManagement.Internal</Namespace>
|
|
<Namespace>Amazon.Runtime.EventStreams</Namespace>
|
|
<Namespace>Amazon.Runtime.EventStreams.Internal</Namespace>
|
|
<Namespace>Amazon.Runtime.Internal</Namespace>
|
|
<Namespace>Amazon.Runtime.Internal.Auth</Namespace>
|
|
<Namespace>Amazon.Runtime.Internal.Settings</Namespace>
|
|
<Namespace>Amazon.Runtime.Internal.Transform</Namespace>
|
|
<Namespace>Amazon.Runtime.Internal.Util</Namespace>
|
|
<Namespace>Amazon.Runtime.SharedInterfaces</Namespace>
|
|
<Namespace>Amazon.Runtime.SharedInterfaces.Internal</Namespace>
|
|
<Namespace>Amazon.S3</Namespace>
|
|
<Namespace>Amazon.S3.Encryption</Namespace>
|
|
<Namespace>Amazon.S3.Encryption.Internal</Namespace>
|
|
<Namespace>Amazon.S3.Internal</Namespace>
|
|
<Namespace>Amazon.S3.IO</Namespace>
|
|
<Namespace>Amazon.S3.Model</Namespace>
|
|
<Namespace>Amazon.S3.Model.Internal.MarshallTransformations</Namespace>
|
|
<Namespace>Amazon.S3.Transfer</Namespace>
|
|
<Namespace>Amazon.S3.Util</Namespace>
|
|
<Namespace>Amazon.Util</Namespace>
|
|
<Namespace>Amazon.Util.Internal</Namespace>
|
|
<Namespace>Amazon.Util.Internal.PlatformServices</Namespace>
|
|
<Namespace>Newtonsoft.Json</Namespace>
|
|
<Namespace>Newtonsoft.Json.Converters</Namespace>
|
|
<Namespace>Newtonsoft.Json.Linq</Namespace>
|
|
<Namespace>Newtonsoft.Json.Schema</Namespace>
|
|
<Namespace>Newtonsoft.Json.Serialization</Namespace>
|
|
<Namespace>System</Namespace>
|
|
<Namespace>System.Diagnostics</Namespace>
|
|
<Namespace>System.Diagnostics.Tracing</Namespace>
|
|
<Namespace>System.IO.Compression</Namespace>
|
|
<Namespace>ThirdParty.BouncyCastle.Asn1</Namespace>
|
|
<Namespace>ThirdParty.BouncyCastle.Asn1.Utilities</Namespace>
|
|
<Namespace>ThirdParty.BouncyCastle.Math</Namespace>
|
|
<Namespace>ThirdParty.BouncyCastle.OpenSsl</Namespace>
|
|
<Namespace>ThirdParty.BouncyCastle.Utilities.IO.Pem</Namespace>
|
|
<Namespace>ThirdParty.Ionic.Zlib</Namespace>
|
|
<Namespace>ThirdParty.Json.LitJson</Namespace>
|
|
<Namespace>ThirdParty.MD5</Namespace>
|
|
</Query>
|
|
|
|
void Main()
|
|
{
|
|
var testset = new string[] { "3", "167", "168", "172", "4", "5", "6" };
|
|
|
|
var IncludeSolution = "";
|
|
var ExcludeSolution = "";
|
|
foreach (var check in checkInclude(IncludeSolution, testset))
|
|
{
|
|
Console.WriteLine($"{check.Item1} is {check.Item2}");
|
|
}
|
|
Console.WriteLine("\r\nExclude \"\"");
|
|
foreach (var check in checkExclude(ExcludeSolution, testset))
|
|
{
|
|
Console.WriteLine($"{check.Item1} is {check.Item2}");
|
|
}
|
|
Console.WriteLine("\r\nInclude \"^3$\"");
|
|
IncludeSolution = "^3$";
|
|
foreach (var check in checkInclude(IncludeSolution, testset))
|
|
{
|
|
Console.WriteLine($"{check.Item1} is {check.Item2}");
|
|
}
|
|
ExcludeSolution = "^167$|^168$";
|
|
Console.WriteLine("\r\nExclude \"^167$|^168$\"");
|
|
foreach (var check in checkExclude(ExcludeSolution, testset))
|
|
{
|
|
Console.WriteLine($"{check.Item1} is {check.Item2}");
|
|
}
|
|
}
|
|
|
|
public IEnumerable<Tuple<string, bool>> checkInclude(string pattern, string[] testset)
|
|
{
|
|
var regex = string.IsNullOrEmpty(pattern) ? new Regex("^.+$") : new Regex(pattern);
|
|
return testset.ToList().ConvertAll(t => new Tuple<string, bool>(t, regex.IsMatch(t)));
|
|
}
|
|
|
|
public IEnumerable<Tuple<string, bool>> checkExclude(string pattern, string[] testset)
|
|
{
|
|
var regex = string.IsNullOrEmpty(pattern) ? new Regex("^$") : new Regex(pattern);
|
|
return testset.ToList().ConvertAll(t => new Tuple<string, bool>(t, regex.IsMatch(t)));
|
|
}
|
|
|
|
// Define other methods and classes here
|