public static void Write(Asset asset, StreamWriter output) { var columns = new IColumns <IApiCall>[] { new Column <IApiCall, object?>("Frame", dc => dc.Owner?.Owner?.Index), new Column <IApiCall, object?>("From", dc => dc.Owner?.Index), new Column <IApiCall, object?>("To", dc => GetLastUser(asset, dc)?.Index), new Column <IApiCall, object>("Method", dc => dc.Name), new Column <IApiCall, object>("Slot", dc => GetResourceIdenfifier(asset, dc)), new Column <IApiCall, object>("Shader(s)", dc => $"\"{asset.GetShadersUntilOverriden(dc).ExceptNull().Select(s => s.Hex).Delimit('\n')}\""), }; output.WriteLine($"Type:,{GetAssetSubType(asset)},{asset.GetType().Name}"); if (asset.Override != null) { output.WriteLine($"Override:,{asset.Override.Name}"); } output.WriteLine(); output.WriteLine($"Slot,Count,Variable"); asset.Slots.ForEach(s => output.WriteLine($"{s.index},{s.slots.Count},{asset.GetNameForSlot(s.index)}")); output.WriteLine(); output.WriteLine(columns.Headers()); asset.LifeCycle.ForEach(dc => output.WriteLine(columns.Values(dc))); }