-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,967 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
# step into the directory of the script | ||
cd "$(dirname "$0")" | ||
|
||
|
||
# compile the project | ||
nuget restore rosette_api.sln | ||
msbuild /p:Configuration=Release rosette_api.sln | ||
# if last command is empty then exit | ||
if [ $? -ne 0 ]; then | ||
exit 1 | ||
fi | ||
|
||
cp packages/Newtonsoft.Json.13.0.2/lib/net45/Newtonsoft.Json.dll rosette_apiExamples/. | ||
cp rosette_api/bin/Release/rosette_api.dll rosette_apiExamples/. | ||
cd rosette_apiExamples | ||
# Loop over parameters | ||
for filename in "$@" | ||
do | ||
if [ -f "${filename}.cs" ]; then | ||
echo "####> Compiling and running ${filename} example" | ||
csc "${filename}.cs" /r:rosette_api.dll /r:System.Net.Http.dll /r:System.Web.Extensions.dll /r:Newtonsoft.Json.dll | ||
# if last command is empty then exit | ||
if [ $? -eq 0 ]; then | ||
mono "${filename}.exe" | ||
fi | ||
else | ||
echo "####> File ${filename}.cs not found in rosette_apiExamples directory" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace rosette_api { | ||
|
||
/// <summary> | ||
/// JsonConverter for Unfielded Record Similarity objects | ||
/// </summary> | ||
public class UnfieldedRecordSimilarityConverter : JsonConverter | ||
{ | ||
public override bool CanConvert(Type objectType) | ||
{ | ||
return true; | ||
} | ||
|
||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
writer.WriteValue(value.ToString()); | ||
} | ||
|
||
public override bool CanRead | ||
{ | ||
get { return false; } | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
Oops, something went wrong.