Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/System.Management.Automation/engine/serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,13 @@ internal static string Serialize(IList<object> source, int depth, bool enumerate
/// <summary>
/// Deserializes PowerShell CliXml into an object.
/// </summary>
/// <param name="source">The CliXml the represents the object to deserialize.</param>
/// <returns>An object that represents the serialized content.</returns>
/// <param name="source">The CliXml that represents the object to deserialize.</param>
/// <returns>
/// The shape of the returned value depends on how many objects the CliXml contains:
/// <see langword="null"/> if it contains no objects, the single deserialized object if it
/// contains exactly one, or an <see cref="object"/> array if it contains more than one.
/// Use <see cref="DeserializeAsList(string)"/> instead if a consistent return type is needed.
/// </returns>
public static object Deserialize(string source)
{
object[] results = DeserializeAsList(source);
Expand All @@ -188,8 +193,8 @@ public static object Deserialize(string source)
/// <summary>
/// Deserializes PowerShell CliXml into a list of objects.
/// </summary>
/// <param name="source">The CliXml the represents the object to deserialize.</param>
/// <returns>An object array represents the serialized content.</returns>
/// <param name="source">The CliXml that represents the object to deserialize.</param>
/// <returns>An object array that represents the serialized content.</returns>
public static object[] DeserializeAsList(string source)
{
List<object> results = new List<object>();
Expand Down