1 // 2 // Copyright (c) 2010-2018 Antmicro 3 // Copyright (c) 2011-2015 Realtime Embedded 4 // 5 // This file is licensed under the MIT License. 6 // Full license text is available in 'licenses/MIT.txt'. 7 // 8 9 using System.Collections.Generic; 10 using System.Linq; 11 using System.Reflection; 12 using System; 13 14 namespace Antmicro.Renode.Utilities 15 { 16 public class MonitorInfo 17 { 18 public IEnumerable<MethodInfo> Methods{get;set;} 19 20 public IEnumerable<PropertyInfo> Properties{get;set;} 21 22 public IEnumerable<PropertyInfo> Indexers{ get; set; } 23 24 public IEnumerable<FieldInfo> Fields{get;set;} 25 26 27 public IEnumerable<String> AllNames 28 { 29 get 30 { 31 var names = new List<String>(); 32 if (Methods != null) 33 { 34 names.AddRange(Methods.Select(x => x.Name)); 35 } 36 if (Properties != null) 37 { 38 names.AddRange(Properties.Select(x => x.Name)); 39 } 40 if (Fields != null) 41 { 42 names.AddRange(Fields.Select(x => x.Name)); 43 } 44 if(Indexers != null) 45 { 46 names.AddRange(Indexers.Select(x => x.Name)); 47 } 48 return names; 49 } 50 } 51 } 52 } 53 54