NOA DebuggerNOA Debugger
  • v1.7.0
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • v1.7.0
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • NoaInformationDownloadCallbacks

NoaInformationDownloadCallbacks

Configure events related to Information downloads.

By passing a class that inherits NoaInformationDownloadCallbacks to NoaInformation, you can customize download-related events.

Overridable Members

Methods

NameDescription
OnBeforeConversion(downloadInfo)Executes before converting the target data to a string for download. Both the argument and return value are IReadOnlyDictionary<InformationTabType, IReadOnlyList<InformationGroup>> which holds tab names and lists of system item groups. If you return edited values, they will be reflected in NOA Debugger's JSON conversion process.
OnBeforeDownload(info)Refer to NoaDownloadCallbacks.OnBeforeDownload(info).
OnAfterDownload(info, status)Refer to NoaDownloadCallbacks.OnAfterDownload(info, status).

Properties

NameDescription
IsAllowBaseDownloadRefer to NoaDownloadCallbacks.IsAllowBaseDownload.

Related Types

INoaInformationDownloadCallbacks

NoaInformationDownloadCallbacks.OnBeforeConversion is defined in this interface.

If you want to consolidate multiple callback definitions in a custom class, or add callback functionality while inheriting an existing custom class, you can achieve this by using this interface instead of the NoaInformationDownloadCallbacks class.

InformationGroup

A class that represents a group of system information used in the OnBeforeConversion method of NoaInformationDownloadCallbacks.

It holds the group name and properties (key-value pairs) within the group.

NameDescription
NameThe group name (read-only).
KeyValuesA read-only Dictionary that holds pairs of system item names and values.

InformationTabType

An enumeration type that represents the Information tab type used in the OnBeforeConversion method of NoaInformationDownloadCallbacks.

ValueDescription
AppRepresents the App tab.
DeviceRepresents the Device tab.
CustomRepresents the Custom tab.

NoaInformationDownloadInfo

A struct that represents Information download data, used in the OnBeforeConversion method of NoaInformationDownloadCallbacks.

Holds InformationTabType as keys and a list of groups contained in each tab as values.

Property NameDescription
InformationGroupsA read-only Dictionary that holds pairs of tab types and InformationGroup lists.

Sample Code

#if NOA_DEBUGGER
using NoaDebugger;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

// Example of executing events before and after NOA Debugger's Information download process (using a class)
public class ExampleInformationDownloader : NoaInformationDownloadCallbacks
{
    public override NoaInformationDownloadInfo OnBeforeConversion(NoaInformationDownloadInfo downloadInfo)
    {
        // Log the group count for the "App" tab
        if (downloadInfo.InformationGroups.TryGetValue(InformationTabType.App, out var appGroups))
        {
            Debug.Log($"Information download. App group count: {appGroups.Count}");
            foreach (var group in appGroups)
            {
                Debug.Log($"Group: {group.Name}");
                foreach (var kvp in group.KeyValues)
                {
                    Debug.Log($"{kvp.Key}: {kvp.Value}");
                }
            }
        }
        
        // Example of excluding the Custom tab from download
        return new NoaInformationDownloadInfo(
            downloadInfo.InformationGroups.Where(kvp => kvp.Key != InformationTabType.Custom)
        );
    }

    // You can also use methods from INoaDownloadCallbacks
    public override NoaDownloadInfo OnBeforeDownload(NoaDownloadInfo info)
    {
        info.FileName = $"Sample-{info.FileName}";
        return info;
    }

    public override void OnAfterDownload(NoaDownloadInfo info, NoaDownloadStatus status)
    {
        Debug.Log($"Download finished with status: {status}");
    }
}

// Example of implementing shared processing across multiple features (using the interface)
public class ExampleCommonDownloader : INoaDownloadCallbacks
{
    // Set IsAllowBaseDownload to true to allow NOA Debugger’s download process.
    public bool IsAllowBaseDownload => true;

    public NoaDownloadInfo OnBeforeDownload(NoaDownloadInfo info)
    {
        Debug.Log($"Download file name: {info.FileName}");
        return info;
    }

    public void OnAfterDownload(NoaDownloadInfo info, NoaDownloadStatus status)
    {
        Debug.Log($"Download finished with status: {status}");
    }
}

public class ExampleDerivedInformationDownloader : ExampleCommonDownloader, INoaInformationDownloadCallbacks
{
    public NoaInformationDownloadInfo OnBeforeConversion(NoaInformationDownloadInfo downloadInfo)
    {
        // Example of excluding specific properties within groups
        var modifiedGroups = new Dictionary>();
        
        foreach (var tabKvp in downloadInfo.InformationGroups)
        {
            var modifiedGroupsList = new List();
            
            foreach (var group in tabKvp.Value)
            {
                // Filter out keys containing "Test" and create a new Dictionary
                var filteredKeyValues = group.KeyValues
                    .Where(kvp => !kvp.Key.Contains("Test"))
                    .ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
                
                // Create a new InformationGroup
                var modifiedGroup = new InformationGroup(group.Name, filteredKeyValues);
                modifiedGroupsList.Add(modifiedGroup);
            }
            
            modifiedGroups[tabKvp.Key] = modifiedGroupsList;
        }
        
        return new NoaInformationDownloadInfo(modifiedGroups);
    }
}
#endif

Links

Related Features

  • Information
  • About Download

Classes Used

  • NoaInformation

Base Class

  • NoaDownloadCallbacks