Files
2026-07-13 13:13:17 +08:00

33 lines
844 B
C#

#nullable enable
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using T3.Core.Model;
namespace T3.Core.Operator;
public static class SymbolRegistry //: IDisposable
{
public static bool TryGetSymbol(Guid symbolId, [NotNullWhen(true)] out Symbol? symbol)
{
foreach(var package in SymbolPackage.AllPackages)
{
if (package.Symbols.TryGetValue(symbolId, out symbol))
return true;
}
symbol = null;
return false;
}
public static IEnumerable<Symbol> SymbolsFromAllPackages()
{
foreach (var package in SymbolPackage.AllPackages)
{
foreach (var s in package.Symbols.Values)
{
yield return s;
}
}
}
}