Skip to content

Commit 7ccf832

Browse files
committed
Merge branch 'development' into gh-85-dynamicInputContext
2 parents 924160b + 0c6eb93 commit 7ccf832

File tree

89 files changed

+5925
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+5925
-290
lines changed

IBM.WatsonDeveloperCloud.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IBM.WatsonDeveloperCloud.Pe
9292
EndProject
9393
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IBM.WatsonDeveloperCloud.Conversation.Example", "examples\IBM.WatsonDeveloperCloud.Conversation.Example\IBM.WatsonDeveloperCloud.Conversation.Example.xproj", "{FE6E9777-A5FC-4842-98EC-159CB3471D08}"
9494
EndProject
95+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IBM.WatsonDeveloperCloud.VisualRecognition.Example", "examples\IBM.WatsonDeveloperCloud.VisualRecognition.Example\IBM.WatsonDeveloperCloud.VisualRecognition.Example.xproj", "{8F6C1BE5-D4C6-428F-B196-610297951444}"
96+
EndProject
9597
Global
9698
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9799
Debug|Any CPU = Debug|Any CPU
@@ -222,6 +224,10 @@ Global
222224
{FE6E9777-A5FC-4842-98EC-159CB3471D08}.Debug|Any CPU.Build.0 = Debug|Any CPU
223225
{FE6E9777-A5FC-4842-98EC-159CB3471D08}.Release|Any CPU.ActiveCfg = Release|Any CPU
224226
{FE6E9777-A5FC-4842-98EC-159CB3471D08}.Release|Any CPU.Build.0 = Release|Any CPU
227+
{8F6C1BE5-D4C6-428F-B196-610297951444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
228+
{8F6C1BE5-D4C6-428F-B196-610297951444}.Debug|Any CPU.Build.0 = Debug|Any CPU
229+
{8F6C1BE5-D4C6-428F-B196-610297951444}.Release|Any CPU.ActiveCfg = Release|Any CPU
230+
{8F6C1BE5-D4C6-428F-B196-610297951444}.Release|Any CPU.Build.0 = Release|Any CPU
225231
EndGlobalSection
226232
GlobalSection(SolutionProperties) = preSolution
227233
HideSolutionNode = FALSE
@@ -268,5 +274,6 @@ Global
268274
{B46F9958-1284-4EBD-A5B3-C4EE6ED14D8D} = {D65AC99F-4E63-4362-8765-EB6F15838CA0}
269275
{2A13BC39-4315-4501-AB8E-68F6E7F97EAB} = {D65AC99F-4E63-4362-8765-EB6F15838CA0}
270276
{FE6E9777-A5FC-4842-98EC-159CB3471D08} = {8B927AB2-21F8-40DE-BE6B-5B1105453133}
277+
{8F6C1BE5-D4C6-428F-B196-610297951444} = {A1BC3262-1837-40D9-A530-DCFE679927C2}
271278
EndGlobalSection
272279
EndGlobal

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ You can get the latest SDK packages through NuGet. Installation instructions can
2626
* [Speech to Text](/src/IBM.WatsonDeveloperCloud.SpeechToText)
2727
* [Text to Speech](/src/IBM.WatsonDeveloperCloud.TextToSpeech)
2828
* [Conversation](/src/IBM.WatsonDeveloperCloud.Conversation)
29-
<!-- * [Discovery](/src/IBM.WatsonDeveloperCloud.Discovery) -->
30-
<!-- * [Visual Recognition](/src/IBM.WatsonDeveloperCloud.VisualRecognition) -->
29+
* [Visual Recognition](/src/IBM.WatsonDeveloperCloud.VisualRecognition)
3130
* [Language Translator](/src/IBM.WatsonDeveloperCloud.LanguageTranslator)
3231
* [Tone Analyzer](/src/IBM.WatsonDeveloperCloud.ToneAnalyzer)
3332
* [Personality Insights](/src/IBM.WatsonDeveloperCloud.PersonalityInsights)
33+
<!-- * [Discovery](/src/IBM.WatsonDeveloperCloud.Discovery) -->
3434

3535
Or manually [here][latest_release].
3636

@@ -55,7 +55,7 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md).<TODO revise coding standard>
5555
[wdc]: http://www.ibm.com/watson/developercloud/
5656
[bluemix_registration]: http://bluemix.net/registration
5757
[ibm-github]: http://ibm.github.io/
58-
<TODO latest release url>
58+
5959
[latest_release]: https://github.com/watson-developer-cloud/dotnet-standard-sdk/releases/latest
6060
[dw-answers]: https://developer.ibm.com/answers/questions/ask/?topics=watson
6161
[stack-overflow]: http://stackoverflow.com/questions/ask?tags=ibm-watson

appveyor.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ branches:
44
- gh-pages
55
configuration: Release
66
platform: Any CPU
7+
clone_folder: C:\projects\dotnet-standard-sdk
78
environment:
89
COVERALLS_REPO_TOKEN:
910
secure: Dnsrk2n+VNE4swcbTLXpfnHwUwTWT8TqMiMkthU6mq/ohNq9dA2rrSA6kdLDBKME
1011
GH_TOKEN:
1112
secure: J0LjUlYl+lGJMLBcOgVF1m1I07nyr+8yFOMaNBA23RGLMJKvYnRlhmGWXp07ejgu
1213
CRED_SECRET:
1314
secure: eEcA/09B7XzeTSb3GlaeqcWfQ/TemXxAq9/0AFM5+z8=
14-
VCAP_SERVICES: config
15+
VCAP_SERVICES: C:\projects\dotnet-standard-sdk\config
1516
install:
1617
- cmd: >-
1718
rm -rf packages
@@ -81,8 +82,13 @@ after_build:
8182
{
8283
Write-Output "branchName is $branchName. Not generating documentation."
8384
}
85+
86+
87+
Move-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.VisualRecognition.IntegrationTests\exampleData C:\projects\dotnet-standard-sdk
88+
89+
Move-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.SpeechToText.IntegrationTests\Assets C:\projects\dotnet-standard-sdk
8490
test_script:
85-
- ps: "if((Test-Path -Path coverage))\n{\n rm coverage -r -force\n}\nNew-Item -path . -name coverage -itemtype directory\nForEach ($folder in (Get-ChildItem -Path C:\\projects\\dotnet-standard-sdk\\test -Directory)) { \n if(!$folder.Name.Contains(\"VisualRecognition\") -and !$folder.Name.Contains(\"Discovery\"))\n {\n echo \"isPullRequest: $isPullRequest\"\n $isPullRequest = Test-Path $env:APPVEYOR_PULL_REQUEST_NUMBER\n if(!$isPullRequest)\n {\n dotnet test $folder.FullName\n #if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }\n echo \"Test passed: $?\"\n echo \"LastExitCode: $LastExitCode\"\n $openCover = 'C:\\projects\\dotnet-standard-sdk\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe' \n $targetArgs = '-targetargs: test ' + $folder.FullName + ' -c Release -f netcoreapp1.0'\n $filter = '-filter:+[IBM.WatsonDeveloperCloud*]*-[*Tests*]*-[*Example*]*'\n & $openCover '-target:C:\\Program Files\\dotnet\\dotnet.exe' $targetArgs '-register:user' $filter '-oldStyle' '-mergeoutput' '-hideskipped:File' '-searchdirs:$testdir\\bin\\release\\netcoreapp1.0' '-output:coverage\\coverage.xml'\n }\n }\n}\n\nC:\\projects\\dotnet-standard-sdk\\packages\\ReportGenerator.2.4.5.0\\tools\\ReportGenerator.exe -reports:coverage\\coverage.xml -targetdir:coverage -verbosity:Error\n\nif($env:COVERALLS_REPO_TOKEN)\n{\n C:\\projects\\dotnet-standard-sdk\\packages\\coveralls.net.0.7.0\\tools\\csmacnz.Coveralls.exe --opencover -i coverage\\coverage.xml --useRelativePaths\n}\nelse\n{\n Write-Output \"There is no Coveralls Repo Token - not pushing coverage.\"\n}"
91+
- ps: "if((Test-Path -Path coverage))\n{\n rm coverage -r -force\n}\nNew-Item -path . -name coverage -itemtype directory\nForEach ($folder in (Get-ChildItem -Path C:\\projects\\dotnet-standard-sdk\\test -Directory)) { \n if(!$folder.Name.Contains(\"Discovery\"))\n {\n if($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)\n {\n Write-Output \"No pull request number. Executing tests\"\n dotnet test $folder.FullName\n #if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }\n echo \"Test passed: $?\"\n echo \"LastExitCode: $LastExitCode\"\n $openCover = 'C:\\projects\\dotnet-standard-sdk\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe' \n $targetArgs = '-targetargs: test ' + $folder.FullName + ' -c Release -f netcoreapp1.0'\n $filter = '-filter:+[IBM.WatsonDeveloperCloud*]*-[*Tests*]*-[*Example*]*'\n & $openCover '-target:C:\\Program Files\\dotnet\\dotnet.exe' $targetArgs '-register:user' $filter '-oldStyle' '-mergeoutput' '-hideskipped:File' '-searchdirs:$testdir\\bin\\release\\netcoreapp1.0' '-output:coverage\\coverage.xml'\n }\n else\n {\n Write-Output \"Pull request number is $env:APPVEYOR_PULL_REQUEST_NUMBER. Skipping tests.\"\n }\n }\n}\n\nC:\\projects\\dotnet-standard-sdk\\packages\\ReportGenerator.2.4.5.0\\tools\\ReportGenerator.exe -reports:coverage\\coverage.xml -targetdir:coverage -verbosity:Error\n\nif($env:COVERALLS_REPO_TOKEN)\n{\n C:\\projects\\dotnet-standard-sdk\\packages\\coveralls.net.0.7.0\\tools\\csmacnz.Coveralls.exe --opencover -i coverage\\coverage.xml --useRelativePaths\n}\nelse\n{\n Write-Output \"There is no Coveralls Repo Token - not pushing coverage.\"\n}"
8692
artifacts:
8793
- path: '\src\IBM.WatsonDeveloperCloud\bin\$(configuration)\*.nupkg'
8894
name: IBM.WatsonDeveloperCloud

config.enc

64 Bytes
Binary file not shown.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright 2017 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using Newtonsoft.Json.Linq;
19+
using System;
20+
using System.IO;
21+
22+
namespace IBM.WatsonDeveloperCloud.VisualRecognition.Example
23+
{
24+
public class Example
25+
{
26+
static void Main(string[] args)
27+
{
28+
var environmentVariable =
29+
Environment.GetEnvironmentVariable("VCAP_SERVICES");
30+
31+
var fileContent =
32+
File.ReadAllText(environmentVariable);
33+
34+
var vcapServices =
35+
JObject.Parse(fileContent);
36+
37+
var apikey =
38+
vcapServices["visual_recognition"][0]["credentials"]["apikey"];
39+
40+
VisualRecognitionServiceExample _visualRecognitionExample = new VisualRecognitionServiceExample(apikey.ToString());
41+
Console.ReadKey();
42+
}
43+
}
44+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
8+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
9+
<PropertyGroup Label="Globals">
10+
<ProjectGuid>8f6c1be5-d4c6-428f-b196-610297951444</ProjectGuid>
11+
<RootNamespace>IBM.WatsonDeveloperCloud.VisualRecognition.Example</RootNamespace>
12+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
13+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
14+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<SchemaVersion>2.0</SchemaVersion>
19+
</PropertyGroup>
20+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
21+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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: AssemblyConfiguration("")]
9+
[assembly: AssemblyCompany("")]
10+
[assembly: AssemblyProduct("IBM.WatsonDeveloperCloud.VisualRecognition.Example")]
11+
[assembly: AssemblyTrademark("")]
12+
13+
// Setting ComVisible to false makes the types in this assembly not visible
14+
// to COM components. If you need to access a type in this assembly from
15+
// COM, set the ComVisible attribute to true on that type.
16+
[assembly: ComVisible(false)]
17+
18+
// The following GUID is for the ID of the typelib if this project is exposed to COM
19+
[assembly: Guid("8f6c1be5-d4c6-428f-b196-610297951444")]

0 commit comments

Comments
 (0)