1 // 2 // Copyright (c) 2010-2018 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 namespace Antmicro.Renode.Debugging 8 { 9 public interface IIdentifiable 10 { 11 #if DEBUG 12 int UniqueObjectId { get; } 13 #endif 14 } 15 16 public static class IdentifiableExtensions 17 { 18 #if DEBUG GetDescription(this IIdentifiable @this)19 public static string GetDescription(this IIdentifiable @this) 20 { 21 return $"{@this.GetType().Name}#{@this.UniqueObjectId}"; 22 } 23 #endif 24 } 25 } 26