-
Notifications
You must be signed in to change notification settings - Fork 1
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
7 changed files
with
361 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace ModernMT.Model | ||
{ | ||
public class BatchTranslation : Model | ||
{ | ||
private readonly dynamic _data; | ||
|
||
public Translation Data => _data as Translation; | ||
|
||
public List<Translation> DataList | ||
{ | ||
get | ||
{ | ||
if (_data is List<Translation> list) | ||
return list; | ||
|
||
return new List<Translation>{_data}; | ||
} | ||
|
||
} | ||
|
||
public readonly dynamic Metadata; | ||
|
||
public BatchTranslation(dynamic data, dynamic metadata) | ||
{ | ||
_data = data; | ||
Metadata = metadata; | ||
} | ||
|
||
} | ||
} |
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,13 @@ | ||
using JWT.Exceptions; | ||
|
||
namespace ModernMT | ||
{ | ||
public class SignatureException : ModernMTException | ||
{ | ||
public SignatureException(SignatureVerificationException e) | ||
: base(0, "SignatureException", e.Message) | ||
{ | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.