Commit 2c390877 authored by Matija Obreza's avatar Matija Obreza

Moved Console app to src/

- Removed unused files
parent afae4672
#
# Generated by: https://github.com/openapitools/openapi-generator.git
#
language: csharp
mono:
- latest
solution: GRINGlobal.Client.sln
script:
- /bin/sh ./mono_nunit_test.sh
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.29424.173
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GRINGlobal.Client", "src\GRINGlobal.Client\GRINGlobal.Client.csproj", "{DC5B00A0-0AC2-4035-BFE6-B9D27C205BFF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GRINGlobal.Client", "src\GRINGlobal.Client\GRINGlobal.Client.csproj", "{DC5B00A0-0AC2-4035-BFE6-B9D27C205BFF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GRINGlobal.Client.Test", "src\GRINGlobal.Client.Test\GRINGlobal.Client.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GRINGlobal.Client.Test", "src\GRINGlobal.Client.Test\GRINGlobal.Client.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{2C55A4E5-BF3B-492A-A549-094434697895}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console", "src\Console\Console.csproj", "{CEED1623-BC8E-4E9B-B5A7-73C7A9C754DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -22,12 +22,15 @@ Global
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
{2C55A4E5-BF3B-492A-A549-094434697895}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C55A4E5-BF3B-492A-A549-094434697895}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C55A4E5-BF3B-492A-A549-094434697895}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C55A4E5-BF3B-492A-A549-094434697895}.Release|Any CPU.Build.0 = Release|Any CPU
{CEED1623-BC8E-4E9B-B5A7-73C7A9C754DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEED1623-BC8E-4E9B-B5A7-73C7A9C754DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEED1623-BC8E-4E9B-B5A7-73C7A9C754DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEED1623-BC8E-4E9B-B5A7-73C7A9C754DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7669B008-9A0E-44AC-A0BF-32CA46887B41}
EndGlobalSection
EndGlobal
:: Generated by: https://github.com/openapitools/openapi-generator.git
::
@echo off
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')"
.\nuget.exe install src\GRINGlobal.Client\packages.config -o packages
if not exist ".\bin" mkdir bin
copy packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
copy packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\GRINGlobal.Client.dll /recurse:src\GRINGlobal.Client\*.cs /doc:bin\GRINGlobal.Client.xml
#!/usr/bin/env bash
#
# Generated by: https://github.com/openapitools/openapi-generator.git
#
frameworkVersion=net45
# sdk must match installed framworks under PREFIX/lib/mono/[value]
sdk=4.5.2-api
# langversion refers to C# language features. see man mcs for details.
langversion=${sdk}
nuget_cmd=nuget
# Match against our known SDK possibilities
case "${sdk}" in
4)
langversion=4
;;
4.5*)
langversion=5
;;
4.6*)
langversion=6
;;
4.7*)
langversion=7 # ignoring 7.1 for now.
;;
*)
langversion=6
;;
esac
echo "[INFO] Target framework: ${frameworkVersion}"
if ! type nuget &>/dev/null; then
echo "[INFO] Download nuget and packages"
wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe;
nuget_cmd="mono nuget.exe"
fi
mozroots --import --sync
${nuget_cmd} install src/GRINGlobal.Client/packages.config -o packages;
echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
cp packages/Newtonsoft.Json.12.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
cp packages/JsonSubTypes.1.5.2/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll
echo "[INFO] Run 'mcs' to build bin/GRINGlobal.Client.dll"
mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\
bin/RestSharp.dll,\
System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/GRINGlobal.Client.dll \
-recurse:'src/GRINGlobal.Client/*.cs' \
-doc:bin/GRINGlobal.Client.xml \
-platform:anycpu
if [ $? -ne 0 ]
then
echo "[ERROR] Compilation failed with exit code $?"
exit 1
else
echo "[INFO] bin/GRINGlobal.Client.dll was created successfully"
fi
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
#!/usr/bin/env bash
#
# Generated by: https://github.com/openapitools/openapi-generator.git
#
wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync
echo "[INFO] remove bin/Debug/GRINGlobal.Client.Test.dll"
rm src/GRINGlobal.Client.Test/bin/Debug/GRINGlobal.Client.Test.dll 2> /dev/null
echo "[INFO] install NUnit runners via NuGet"
wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync
mono nuget.exe install src/GRINGlobal.Client.Test/packages.config -o packages
echo "[INFO] Install NUnit Console 3.x runners via NuGet"
mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages
echo "[INFO] Build the solution and run the unit test"
xbuild GRINGlobal.Client.sln && \
mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/GRINGlobal.Client.Test/bin/Debug/GRINGlobal.Client.Test.dll
......@@ -11,7 +11,7 @@
<Reference Include="System.Web" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\GRINGlobal.Client\GRINGlobal.Client.csproj" />
<ProjectReference Include="..\GRINGlobal.Client\GRINGlobal.Client.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
......
......@@ -35,10 +35,8 @@ namespace Example
Debug.Write(response.Content);
var tokens = JsonConvert.DeserializeObject(response.Content);
Console.Out.WriteLine(tokens);
return;
}
// Configuration.Default.AddDefaultHeader("Origin", "https://sandbox.genesys-pgr.org");
var apiInstance = new AccessionApi(Configuration.Default);
var apiTaxonomy = new TaxonomyApi(Configuration.Default);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment