Skip to content

Commit

Permalink
Update 0.7.0. Move SettingsBase to new package, cleanup warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe committed Mar 18, 2024
1 parent 7f53d09 commit 5a0abf6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 968 deletions.
9 changes: 5 additions & 4 deletions src/IAsyncSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace OwlCore.ComponentModel
public interface IAsyncSerializer<TSerialized>
{
/// <summary>
/// Serializes the provided <paramref cref="data"/> into <typeparam name="TSerialized"/>.
/// Serializes the provided <paramref name="data"/> into <typeparamref name="TSerialized"/>.
/// </summary>
/// <param name="data">The object instance to serialize.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the ongoing task.</param>
Expand All @@ -20,7 +20,7 @@ public interface IAsyncSerializer<TSerialized>
public Task<TSerialized> SerializeAsync<T>(T data, CancellationToken? cancellationToken = null);

/// <summary>
/// Serializes the provided <paramref cref="data"/> into <typeparam name="TSerialized"/>.
/// Serializes the provided <paramref name="data"/> into <typeparamref name="TSerialized"/>.
/// </summary>
/// <param name="data">The object instance to serialize.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the ongoing task.</param>
Expand All @@ -46,15 +46,16 @@ public interface IAsyncSerializer<TSerialized>
/// <returns>A deserialized instance of the provided serialized data.</returns>
public Task<object> DeserializeAsync(Type returnType, TSerialized serialized, CancellationToken? cancellationToken = null);
}

/// <summary>
/// An interface that allows serializing data to <typeparamref name="TDeserialized"/> and from <typeparamref name="TSerialized"/> asynchronously.
/// </summary>
/// <typeparam name="TSerialized">The type that data is serialized to.</typeparam>
/// <typeparam name="TDeserialized">The type that data is deserialized to.</typeparam>
public interface IAsyncSerializer<TSerialized, TDeserialized>
{
/// <summary>
/// Serializes the provided <paramref cref="data"/> into <typeparam name="TSerialized"/>.
/// Serializes the provided <paramref name="data"/> into <typeparamref name="TSerialized"/>.
/// </summary>
/// <param name="data">The object instance to serialize.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the ongoing task.</param>
Expand Down
9 changes: 5 additions & 4 deletions src/ISerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ namespace OwlCore.ComponentModel
public interface ISerializer<TSerialized>
{
/// <summary>
/// Serializes the provided <paramref cref="data"/> into <typeparam name="TSerialized"/>.
/// Serializes the provided <paramref name="data"/> into <typeparamref name="TSerialized"/>.
/// </summary>
/// <param name="data">The object instance to serialize.</param>
/// <typeparam name="T">The type of the object being serialized.</typeparam>
/// <returns>A serialized instance of <paramref name="data"/>.</returns>
public TSerialized Serialize<T>(T data);

/// <summary>
/// Serializes the provided <paramref cref="data"/> into <typeparam name="TSerialized"/>.
/// Serializes the provided <paramref name="data"/> into <typeparamref name="TSerialized"/>.
/// </summary>
/// <param name="data">The object instance to serialize.</param>
/// <param name="type">The type of the object being serialized.</param>
Expand All @@ -40,15 +40,16 @@ public interface ISerializer<TSerialized>
/// <returns>A deserialized instance of the provided serialized data.</returns>
public object Deserialize(Type type, TSerialized serialized);
}

/// <summary>
/// An interface that allows serializing data to <typeparamref name="TDeserialized"/> and from <typeparamref name="TSerialized"/> synchronously.
/// </summary>
/// <typeparam name="TSerialized">The type that data is serialized to.</typeparam>
/// <typeparam name="TDeserialized">The type that data is deserialized to.</typeparam>
public interface ISerializer<TSerialized, TDeserialized>
{
/// <summary>
/// Serializes the provided <paramref cref="data"/> into <typeparam name="TSerialized"/>.
/// Serializes the provided <paramref name="data"/> into <typeparamref name="TSerialized"/>.
/// </summary>
/// <param name="data">The object instance to serialize.</param>
/// <returns>A serialized instance of <paramref name="data"/>.</returns>
Expand Down
2 changes: 1 addition & 1 deletion src/LazySeekStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public override void SetLength(long value)
}

/// <inheritdoc />
public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException($"Writing not supported by {nameof(LazySeekStream)}");
public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException($"Writing not supported by {nameof(LazySeekStream)}.");

/// <inheritdoc />
protected override void Dispose(bool disposing)
Expand Down
9 changes: 6 additions & 3 deletions src/OwlCore.ComponentModel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>

<Author>Arlo Godfrey</Author>
<Version>0.6.0</Version>
<Version>0.7.0</Version>
<Product>OwlCore</Product>
<Description>Provides classes that are used to implement the run-time behavior of components.</Description>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIcon>logo.png</PackageIcon>
<PackageProjectUrl>https://github.com/Arlodotexe/OwlCore.ComponentModel</PackageProjectUrl>
<PackageReleaseNotes>
--- 0.7.0 ---
[Breaking]
SettingsBase has been moved into a separate package, OwlCore.ComponentModel.Settings. This allows us to remove the dependency on OwlCore.Storage, which is not strictly needed for most consumers of this package.

--- 0.6.0 ---
[New]
Added LengthOverrideStream, a simple Stream wrapper that allows overriding the Length property.
Expand Down Expand Up @@ -104,8 +108,7 @@ Initial separated package release of OwlCore.ComponentModel. Transferred from Ow

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="OwlCore.Storage" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.2.2" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 5a0abf6

Please sign in to comment.