Skip to content

Commit

Permalink
Merge pull request #209 from SceneGate/feature/debugging
Browse files Browse the repository at this point in the history
✨ Enhace debugging view
  • Loading branch information
pleonex committed Jan 31, 2024
2 parents bffa8c5 + b63e543 commit e206c92
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Yarhl/FileSystem/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ namespace Yarhl.FileSystem
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Yarhl.FileFormat;
using Yarhl.IO;

/// <summary>
/// Node in the FileSystem with an associated format.
/// </summary>
[DebuggerDisplay("{Name} [{Format}]")]
public partial class Node : NavigableNode<Node>
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/Yarhl/FileSystem/NodeContainerFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
namespace Yarhl.FileSystem
{
using System;
using System.Diagnostics;
using System.Linq;
using Yarhl.FileFormat;

/// <summary>
/// Node container format for unpack / pack files.
/// </summary>
[DebuggerDisplay("Container: count={Root.Children.Count}")]
public class NodeContainerFormat : IDisposable, ICloneableFormat
{
bool manageRoot;
Expand Down
2 changes: 2 additions & 0 deletions src/Yarhl/IO/BinaryFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
namespace Yarhl.IO
{
using System;
using System.Diagnostics;
using System.IO;
using Yarhl.FileFormat;

/// <summary>
/// Binary format.
/// </summary>
[DebuggerDisplay("Binary: {Stream}")]
public class BinaryFormat : IBinary, IDisposable, ICloneableFormat
{
/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion src/Yarhl/IO/DataStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ namespace Yarhl.IO
using System.Buffers;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using Yarhl.FileFormat;
using Yarhl.IO.StreamFormat;

/// <summary>
Expand All @@ -43,6 +43,10 @@ namespace Yarhl.IO
"",
"S3881",
Justification = "Historical reasons: https://docs.microsoft.com/en-us/dotnet/api/system.io.stream.dispose")]
[DebuggerDisplay(
"pos={\"0x\" + Position.ToString(\"X\")}, " +
"len={\"0x\" + Length.ToString(\"X\")}, " +
"offset={\"0x\" + Offset.ToString(\"X\")}")]
public partial class DataStream : Stream
{
static readonly ConcurrentDictionary<Stream, StreamInfo> Instances = new ConcurrentDictionary<Stream, StreamInfo>();
Expand Down

0 comments on commit e206c92

Please sign in to comment.