-
-
Notifications
You must be signed in to change notification settings - Fork 733
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into net5_compat
- Loading branch information
Showing
30 changed files
with
486 additions
and
1,998 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace ElectronNET.API.Entities | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class Blob : IPostData | ||
{ | ||
/// <summary> | ||
/// The object represents a Blob | ||
/// </summary> | ||
public string Type { get; } = "blob"; | ||
|
||
/// <summary> | ||
/// The UUID of the Blob being uploaded | ||
/// </summary> | ||
public string BlobUUID { get; set; } | ||
} | ||
} |
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,16 @@ | ||
namespace ElectronNET.API.Entities | ||
{ | ||
/// <summary> | ||
/// Interface to use Electrons PostData Object | ||
/// </summary> | ||
public interface IPostData | ||
{ | ||
/// <summary> | ||
/// One of the following: | ||
/// rawData - <see cref="UploadRawData"/> The data is available as a Buffer, in the rawData field. | ||
/// file - <see cref="UploadFile"/> The object represents a file. The filePath, offset, length and modificationTime fields will be used to describe the file. | ||
/// blob - <see cref="Blob"/> The object represents a Blob. The blobUUID field will be used to describe the Blob. | ||
/// </summary> | ||
public string Type { get; } | ||
} | ||
} |
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,34 @@ | ||
namespace ElectronNET.API.Entities | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class UploadFile : IPostData | ||
{ | ||
/// <summary> | ||
/// The object represents a file. | ||
/// </summary> | ||
public string Type { get; } = "file"; | ||
|
||
/// <summary> | ||
/// The path of the file being uploaded. | ||
/// </summary> | ||
public string FilePath { get; set; } | ||
|
||
/// <summary> | ||
/// The offset from the beginning of the file being uploaded, in bytes. Defaults to 0. | ||
/// </summary> | ||
public long Offset { get; set; } = 0; | ||
|
||
/// <summary> | ||
/// The length of the file being uploaded, <see cref="Offset"/>. Defaults to 0. | ||
/// If set to -1, the whole file will be uploaded. | ||
/// </summary> | ||
public long Length { get; set; } = 0; | ||
|
||
/// <summary> | ||
/// The modification time of the file represented by a double, which is the number of seconds since the UNIX Epoch (Jan 1, 1970) | ||
/// </summary> | ||
public double ModificationTime { get; set; } | ||
} | ||
} |
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,18 @@ | ||
namespace ElectronNET.API.Entities | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class UploadRawData : IPostData | ||
{ | ||
/// <summary> | ||
/// The data is available as a Buffer, in the rawData field. | ||
/// </summary> | ||
public string Type { get; } = "rawData"; | ||
|
||
/// <summary> | ||
/// The raw bytes of the post data in a Buffer. | ||
/// </summary> | ||
public byte[] Bytes { get; set; } | ||
} | ||
} |
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
Oops, something went wrong.