Commit Graph

28 Commits

Author SHA1 Message Date
Joakim Lindqvist
6c0afc1fcb CbPackage - Fixed up some warnings in the C# CbPackage code, reducing access scope on things that should be private
Also fixed up inconsistent whitespace.

#jira UE-158872
#preflight https://horde.devtools.epicgames.com/job/62c80bc6f671e8d2fac950f7

[CL 21004958 by Joakim Lindqvist in ue5-main branch]
2022-07-08 07:04:41 -04:00
Joakim Lindqvist
0e6faae889 Fixed failing CbPackage test, Assert.ThrowsException does not support async lambda.
#preflight none

[CL 20964595 by Joakim Lindqvist in ue5-main branch]
2022-07-06 06:46:36 -04:00
Joakim Lindqvist
c8798de32a C# implementation of CompactBinaryPackage (cbpkg)
#rb carl.bystrom
#preflight none

[CL 20964277 by Joakim Lindqvist in ue5-main branch]
2022-07-06 06:02:07 -04:00
Ben Marsh
cbd0f5ea19 Add a common interface for reading/writing to memory (IMemoryReader/IMemoryWriter), which is implemented by the legacy MemoryReader/MemoryWriter classes as well as the newer ByteArrayBuilder.
Also moves VarInt into EpicGames.Core.
#preflight 62bb5e3efd06251187efd3d7

[CL 20863839 by Ben Marsh in ue5-main branch]
2022-06-28 16:14:51 -04:00
Ben Marsh
27ff743762 Fix xmldoc warnings in EpicGames.Serialization.
#preflight none

[CL 20777344 by Ben Marsh in ue5-main branch]
2022-06-22 13:31:00 -04:00
Ben Marsh
a11561ae5f Support for serializing signed and unsigned VarInt types from C#.
#preflight 62b1f6898e03312ad86e0757

[CL 20760159 by Ben Marsh in ue5-main branch]
2022-06-21 13:00:33 -04:00
Ben Marsh
b8e2cda212 EpicGames.Serialization: Add tests for deserializing dictionaries into read-only properties.
#preflight none

[CL 20252945 by Ben Marsh in ue5-main branch]
2022-05-17 18:40:04 -04:00
Ben Marsh
12a0d5010f EpicGames.Serialization: Support deserializing into getter-only collection properties.
#preflight none

[CL 20252879 by Ben Marsh in ue5-main branch]
2022-05-17 18:36:34 -04:00
Ben Marsh
b50740d5c1 Horde: Compact binary serialization improvements.
- Fix serialization of lists, directories and arrays that are set to null.
- Throw an exception when serializing a type that does not have any explicit compact binary field attributes. This is usually an error, caused by serializing a framework type with no matching converter, but can also occur when serializing an empty base class instance. To handle these situations, the class can be marked with [CbObject] to explicitly opt-in to being valid for serialization.

#fyi Joe.Kirchoff
#preflight none

[CL 19526671 by Ben Marsh in ue5-main branch]
2022-03-28 10:11:10 -04:00
Ben Marsh
7a0ca03010 Fix test failure.
#preflight none

[CL 19511958 by Ben Marsh in ue5-main branch]
2022-03-25 10:01:43 -04:00
Ben Marsh
6b226011d7 Change EpicGames.Serialization library to match standard coding style.
#preflight none

[CL 19501703 by Ben Marsh in ue5-main branch]
2022-03-24 15:56:16 -04:00
Ben Marsh
17ddfdfdfc Horde: More improvements to Bundles.
- Now does all string manipulations in UTF8 rather than converting to and fro with data received from Perforce
- Added support for reading a stream out of a CbWriter object. This allows pushing data directly to Horde Storage from the piecemeal 1kb buffers it allocates without having to concatenate everything into a contiguous array first, removing some big allocations and data copying on the common path for serializing objects into Horde Storage.
- Refactored the way that BundleNodeRef objects work so they don't need to track the Bundle that owns them, so we can add some serialization/deserialization tests without having to set up as much framework code.

#preflight none

[CL 19345769 by Ben Marsh in ue5-main branch]
2022-03-10 19:56:01 -05:00
Ben Marsh
1b3110c5ec Horde: Refactored system for creating bundles of tree objects.
- Tree can now be modified without having to have entire working set in memory.
- Multiple nodes can be compressed/decompressed together, and an optional IMemoryCache allows caching decompressed blocks.
- Added support for specifying custom compact-binary serializers on individual properties.
- Added test suite to test bundling functionality.
- Fixed issue where VarInts of negative values would not serialize correctly.
#preflight 621952f68849a7424fa36567

[CL 19158249 by Ben Marsh in ue5-main branch]
2022-02-25 17:11:58 -05:00
Joakim Lindqvist
28a6cd7b1b Missing file from change 19111703 (more tests for EpicGames.Serialization)
#preflight none

[CL 19111816 by Joakim Lindqvist in ue5-main branch]
2022-02-24 06:01:24 -05:00
Joakim Lindqvist
b37024fe9b C# Compact Binary Serialization - Added more tests from Horde Storage (Jupiter Tests) and fixed issues exposed by them.
#preflight none

[CL 19111703 by Joakim Lindqvist in ue5-main branch]
2022-02-24 05:44:12 -05:00
Ben Marsh
9e6e68ba17 CS: Add overloads for commonly serialized compact binary types.
#preflight 61e4a67d7b0f77175a5d6621

[CL 18630220 by Ben Marsh in ue5-main branch]
2022-01-16 18:26:30 -05:00
Ben Marsh
e0f2ac5e4c Target NET 6 for the EpicGames.Serialization.Tests library, so we can run it from the Docker image.
[CL 18272361 by Ben Marsh in ue5-main branch]
2021-11-23 13:01:18 -05:00
Ben Marsh
e1cb80903f Horde: Fix tests in serialization library.
#fyi Ryan.Durand

[CL 18271689 by Ben Marsh in ue5-main branch]
2021-11-23 12:18:30 -05:00
Ben Marsh
5a129c2997 Horde: Add support for querying all objects underneath a given root (eg. /api/v1/objects/NS/HASH/tree). Objects are returned as a stream of compact binary object attachment fields (followed by an actual object) and binary attachment fields.
Optional request body specifies a list of objects that the client already has, and the server does not need to recurse through.

#fyi Joe.Kirchoff

[CL 17391157 by Ben Marsh in ue5-main branch]
2021-09-01 15:22:55 -04:00
Ben Marsh
77210c0efc Horde: Fix DateTime CB serialization tests.
[CL 17368297 by Ben Marsh in ue5-main branch]
2021-08-31 10:56:03 -04:00
jonathan adamczewski
db8046e278 Move DotNETCommon/BuildUtilities to Shared/EpicGames.Build
Also moves DotNETCommon/Metadata.cs to Shared/Metadata.cs

#jira none
#rb tim.smith

[CL 17116964 by jonathan adamczewski in ue5-main branch]
2021-08-10 11:08:41 -04:00
joe kirchoff
d77482768d [Backout] - CL16961198
#fyi Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
Use Microsoft.CodeAnalysis.CSharp.Workspaces for code analysis

#rb none
#rnx

[CL 16961691 by joe kirchoff in ue5-main branch]
2021-07-26 17:58:54 -04:00
Joe Kirchoff
8fcb4dc40e Use Microsoft.CodeAnalysis.CSharp.Workspaces for code analysis
#rb none
#rnx

[CL 16961198 by Joe Kirchoff in ue5-main branch]
2021-07-26 17:14:29 -04:00
Ben Marsh
b3fb0f0503 Horde: Write managed workspace snapshots using Compact Binary.
[CL 16811525 by Ben Marsh in ue5-main branch]
2021-07-06 11:00:26 -04:00
Ben Marsh
a855dca4ea Rename ReadOnlyUtf8String to Utf8String. Strings are always immutable in C#.
[CL 16807051 by Ben Marsh in ue5-main branch]
2021-07-02 12:16:55 -04:00