Skip to content

Commit d4f8672

Browse files
Replace TBD XML doc placeholders in Akka.Serialization (#3435) (#8121)
Co-authored-by: Aaron Stannard <aaron@aaronstannard.com> Co-authored-by: Aaron Stannard <aaron@petabridge.com>
1 parent e6e014d commit d4f8672

2 files changed

Lines changed: 26 additions & 22 deletions

File tree

src/core/Akka/Serialization/NewtonSoftJsonSerializer.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ public class NewtonSoftJsonSerializer : Serializer
157157

158158
private readonly ObjectPool<StringBuilder> _sbPool;
159159
/// <summary>
160-
/// TBD
160+
/// The <see cref="JsonSerializerSettings"/> used to configure JSON serialization and deserialization behavior.
161161
/// </summary>
162162
public JsonSerializerSettings Settings { get; }
163163

164164
/// <summary>
165-
/// TBD
165+
/// The underlying <see cref="JsonSerializer"/> instance used to perform JSON conversion.
166166
/// </summary>
167167
public object Serializer { get { return _serializer; } }
168168

@@ -445,15 +445,16 @@ private static object GetValue(string V)
445445
}
446446

447447
/// <summary>
448-
/// TBD
448+
/// A custom <see cref="JsonConverter"/> that handles types implementing <see cref="ISurrogated"/>
449+
/// and corrects numeric type conversions (int, float, decimal) during deserialization.
449450
/// </summary>
450451
internal class SurrogateConverter : JsonConverter
451452
{
452453
private readonly NewtonSoftJsonSerializer _parent;
453454
/// <summary>
454-
/// TBD
455+
/// Initializes a new instance of the <see cref="SurrogateConverter"/> class.
455456
/// </summary>
456-
/// <param name="parent">TBD</param>
457+
/// <param name="parent">The parent serializer that provides the actor system context for surrogate resolution.</param>
457458
public SurrogateConverter(NewtonSoftJsonSerializer parent)
458459
{
459460
_parent = parent;

src/core/Akka/Serialization/Serialization.cs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,15 @@ public static Information GetCurrentTransportInformation()
167167
}
168168

169169
/// <summary>
170-
/// TBD
170+
/// Executes <paramref name="action"/> while temporarily setting the
171+
/// <see cref="CurrentTransportInformation"/> so that <see cref="IActorRef"/> instances
172+
/// are serialized with the correct remote address.
171173
/// </summary>
172-
/// <typeparam name="T">TBD</typeparam>
173-
/// <param name="system">TBD</param>
174-
/// <param name="address">TBD</param>
175-
/// <param name="action">TBD</param>
176-
/// <returns>TBD</returns>
174+
/// <typeparam name="T">The return type of the <paramref name="action"/> delegate.</typeparam>
175+
/// <param name="system">The actor system used for serialization context.</param>
176+
/// <param name="address">The remote address to embed in serialized actor references.</param>
177+
/// <param name="action">The delegate to execute within the transport context.</param>
178+
/// <returns>The value produced by <paramref name="action"/>.</returns>
177179
[Obsolete("Obsolete. Use the SerializeWithTransport<T>(ExtendedActorSystem) method instead.")]
178180
public static T WithTransport<T>(ActorSystem system, Address address, Func<T> action)
179181
{
@@ -466,11 +468,12 @@ public void AddSerializer(string name, SerializerV2 serializer)
466468
}
467469

468470
/// <summary>
469-
/// TBD
471+
/// Registers a mapping from <paramref name="type"/> to <paramref name="serializer"/>
472+
/// so that instances of that type (and its subtypes) will be handled by the given serializer.
473+
/// Logs a warning if an existing mapping for the same type is being overridden.
470474
/// </summary>
471-
/// <param name="type">TBD</param>
472-
/// <param name="serializer">TBD</param>
473-
/// <returns>TBD</returns>
475+
/// <param name="type">The <see cref="Type"/> to associate with the serializer.</param>
476+
/// <param name="serializer">The <see cref="Akka.Serialization.Serializer"/> that will handle the type.</param>
474477
[MethodImpl(MethodImplOptions.AggressiveInlining)]
475478
public void AddSerializationMap(Type type, Serializer serializer)
476479
{
@@ -563,9 +566,9 @@ internal SerializedPayloadMetadata Serialize(object o, IBufferWriter<byte> write
563566
/// <summary>
564567
/// Deserializes the given array of bytes using the specified serializer id, using the optional type hint to the Serializer.
565568
/// </summary>
566-
/// <param name="bytes">TBD</param>
567-
/// <param name="serializerId">TBD</param>
568-
/// <param name="type">TBD</param>
569+
/// <param name="bytes">The serialized byte array to deserialize.</param>
570+
/// <param name="serializerId">The identifier of the serializer that produced <paramref name="bytes"/>.</param>
571+
/// <param name="type">An optional type hint passed to the serializer to aid deserialization.</param>
569572
/// <exception cref="SerializationException">
570573
/// This exception is thrown if the system cannot find the serializer with the given <paramref name="serializerId"/>.
571574
/// </exception>
@@ -587,9 +590,9 @@ public object Deserialize(byte[] bytes, int serializerId, Type type)
587590
/// <summary>
588591
/// Deserializes the given array of bytes using the specified serializer id, using the optional type hint to the Serializer.
589592
/// </summary>
590-
/// <param name="bytes">TBD</param>
591-
/// <param name="serializerId">TBD</param>
592-
/// <param name="manifest">TBD</param>
593+
/// <param name="bytes">The serialized byte array to deserialize.</param>
594+
/// <param name="serializerId">The identifier of the serializer that produced <paramref name="bytes"/>.</param>
595+
/// <param name="manifest">A string manifest identifying the type, used by <see cref="SerializerWithStringManifest"/> implementations.</param>
593596
/// <exception cref="SerializationException">
594597
/// This exception is thrown if the system cannot find the serializer with the given <paramref name="serializerId"/>
595598
/// or it couldn't find the given <paramref name="manifest"/> with the given <paramref name="serializerId"/>.
@@ -672,7 +675,7 @@ internal SerializerV2 FindSerializerV2For(object obj, string defaultSerializerNa
672675
/// ambiguity it is primarily using the most specific configured class,
673676
/// and secondly the entry configured first.
674677
/// </summary>
675-
/// <param name="objectType">TBD</param>
678+
/// <param name="objectType">The <see cref="Type"/> whose serializer should be resolved.</param>
676679
/// <param name="defaultSerializerName">The config name of the serializer to use when no specific binding config is present</param>
677680
/// <exception cref="SerializationException">
678681
/// This exception is thrown if the serializer of the given <paramref name="objectType"/> could not be found.

0 commit comments

Comments
 (0)