Skip to content

Commit 5605903

Browse files
author
jeffshumphreys@gmail.com
committed
Moved Test functions into subfolde
Solutions in VS are wack. Made project a subproject so it would fit in the master tree.
1 parent 85731e5 commit 5605903

File tree

4 files changed

+151
-0
lines changed

4 files changed

+151
-0
lines changed

TestMySQLCLRFunctions/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5+
</startup>
6+
</configuration>

TestMySQLCLRFunctions/Program.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Diagnostics;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using MySQLCLRFunctions;
8+
9+
namespace TestMySQLCLRFunctions
10+
{
11+
class Program
12+
{
13+
static void Main(string[] args)
14+
{
15+
string output; string input; string marker; int markerno; int howmanyback;
16+
// var i = MySQLCLRFunctions.StringExtract.LeftOf("High.There", ".");
17+
// Debug.Print(i);
18+
// i = MySQLCLRFunctions.StringExtract.LeftOfNth("High.There", ".", 2);
19+
// Debug.Print(i);
20+
input = "EDWPROD.UserData.x.y";
21+
marker = ".";
22+
markerno = 2;
23+
howmanyback = 1;
24+
output = MySQLCLRFunctions.StringExtract.LeftOfNth(input, marker, markerno);
25+
Debug.Print($"MySQLCLRFunctions.StringExtract.LeftOfNth(\"{input}\", \"{marker}\", {markerno});=> {output}");
26+
markerno = 3;
27+
output = MySQLCLRFunctions.StringExtract.LeftOfNth(input, marker, markerno);
28+
Debug.Print($"MySQLCLRFunctions.StringExtract.LeftOfNth(\"{input}\", \"{marker}\", {markerno});=> {output}");
29+
markerno = 5;
30+
output = MySQLCLRFunctions.StringExtract.LeftOfNth(input, marker, markerno);
31+
Debug.Print($"MySQLCLRFunctions.StringExtract.LeftOfNth(\"{input}\", \"{marker}\", {markerno});=> {output}");
32+
33+
markerno = 1;
34+
output = MySQLCLRFunctions.StringExtract.LeftMOfNth(input, marker, markerno, howmanyback);
35+
Debug.Print($"MySQLCLRFunctions.StringExtract.LeftMOfNth(\"{input}\", \"{marker}\", {markerno}, {howmanyback});=> {output}");
36+
markerno = 2; howmanyback = 2;
37+
output = MySQLCLRFunctions.StringExtract.LeftMOfNth(input, marker, markerno, howmanyback);
38+
Debug.Print($"MySQLCLRFunctions.StringExtract.LeftMOfNth(\"{input}\", \"{marker}\", {markerno}, {howmanyback});=> {output}");
39+
markerno = 1; howmanyback = 2;
40+
output = MySQLCLRFunctions.StringExtract.LeftMOfNth(input, marker, markerno, howmanyback);
41+
Debug.Print($"MySQLCLRFunctions.StringExtract.LeftMOfNth(\"{input}\", \"{marker}\", {markerno}, {howmanyback});=> {output}");
42+
markerno = 2; howmanyback = 4;
43+
output = MySQLCLRFunctions.StringExtract.LeftMOfNth(input, marker, markerno, howmanyback);
44+
Debug.Print($"MySQLCLRFunctions.StringExtract.LeftMOfNth(\"{input}\", \"{marker}\", {markerno}, {howmanyback});=> {output}");
45+
input = "[xxx]]y]";
46+
output = MySQLCLRFunctions.StringTransform.RemoveSQLServerNameDelimiters($"{input}");
47+
Debug.Print($"MySQLCLRFunctions.StringTransform.RemoveSQLServerNameDelimiters(\"{input}\");=> {output}");
48+
}
49+
}
50+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("TestMySQLCLRFunctions")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("TestMySQLCLRFunctions")]
13+
[assembly: AssemblyCopyright("Copyright © 2020")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("a084d459-bee6-46bb-bb2c-4756879b2599")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{A084D459-BEE6-46BB-BB2C-4756879B2599}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>TestMySQLCLRFunctions</RootNamespace>
10+
<AssemblyName>TestMySQLCLRFunctions</AssemblyName>
11+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Xml.Linq" />
39+
<Reference Include="System.Data.DataSetExtensions" />
40+
<Reference Include="Microsoft.CSharp" />
41+
<Reference Include="System.Data" />
42+
<Reference Include="System.Net.Http" />
43+
<Reference Include="System.Xml" />
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="Program.cs" />
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<None Include="App.config" />
51+
</ItemGroup>
52+
<ItemGroup>
53+
<ProjectReference Include="..\MySQLCLRFunctions\MySQLCLRFunctions.csproj">
54+
<Project>{6aeae0bf-82e7-4793-8e9d-e649abd0a807}</Project>
55+
<Name>MySQLCLRFunctions</Name>
56+
</ProjectReference>
57+
</ItemGroup>
58+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
59+
</Project>

0 commit comments

Comments
 (0)