- Notifications
You must be signed in to change notification settings - Fork749
Move code to subdirectories and rename or split up#1665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletionssrc/runtime/Codecs/IPyObjectDecoder.cs
This file contains hidden or 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,22 @@ | ||
namespace Python.Runtime; | ||
using System; | ||
/// <summary> | ||
/// Defines <see cref="PyObject"/> conversion to CLR types (unmarshalling) | ||
/// </summary> | ||
public interface IPyObjectDecoder | ||
{ | ||
/// <summary> | ||
/// Checks if this decoder can decode from <paramref name="objectType"/> to <paramref name="targetType"/> | ||
/// </summary> | ||
bool CanDecode(PyType objectType, Type targetType); | ||
/// <summary> | ||
/// Attempts do decode <paramref name="pyObj"/> into a variable of specified type | ||
/// </summary> | ||
/// <typeparam name="T">CLR type to decode into</typeparam> | ||
/// <param name="pyObj">Object to decode</param> | ||
/// <param name="value">The variable, that will receive decoding result</param> | ||
/// <returns></returns> | ||
bool TryDecode<T>(PyObject pyObj, out T? value); | ||
} |
18 changes: 18 additions & 0 deletionssrc/runtime/Codecs/IPyObjectEncoder.cs
This file contains hidden or 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,18 @@ | ||
namespace Python.Runtime; | ||
using System; | ||
/// <summary> | ||
/// Defines conversion from CLR objects into Python objects (e.g. <see cref="PyObject"/>) (marshalling) | ||
/// </summary> | ||
public interface IPyObjectEncoder | ||
{ | ||
/// <summary> | ||
/// Checks if encoder can encode CLR objects of specified type | ||
/// </summary> | ||
bool CanEncode(Type type); | ||
/// <summary> | ||
/// Attempts to encode CLR object <paramref name="value"/> into Python object | ||
/// </summary> | ||
PyObject? TryEncode(object value); | ||
} |
35 changes: 1 addition & 34 deletionssrc/runtime/converterextensions.cs → src/runtime/Codecs/PyObjectConversions.cs
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
81 changes: 0 additions & 81 deletionssrc/runtime/exceptions.cs → src/runtime/Exceptions.cs
This file contains hidden or 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 |
---|---|---|
@@ -5,87 +5,6 @@ | ||
namespace Python.Runtime | ||
{ | ||
/// <summary> | ||
/// Encapsulates the Python exception APIs. | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletionssrc/runtime/Python.Runtime.csproj
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.