1+ //
2+ // Assembly.cs
3+ //
4+ // Author:
5+ // Jonathan Chang <t-jochang@microsoft.com>
6+ //
7+ // Copyright (c) 2022
8+ //
9+ // Permission is hereby granted, free of charge, to any person obtaining a copy
10+ // of this software and associated documentation files (the "Software"), to deal
11+ // in the Software without restriction, including without limitation the rights
12+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+ // copies of the Software, and to permit persons to whom the Software is
14+ // furnished to do so, subject to the following conditions:
15+ //
16+ // The above copyright notice and this permission notice shall be included in
17+ // all copies or substantial portions of the Software.
18+ //
19+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+ // THE SOFTWARE.
26+ using System ;
27+ namespace Mono . Debugging . Client
28+ {
29+ /// <summary>
30+ /// Represents the assembly loaded during the debugging session.
31+ /// </summary>
32+ public class Assembly
33+ {
34+ public Assembly ( string name , string path , bool optimized , bool userCode , string symbolStatus , string symbolFile , int ? order , string version , string timestamp , string address , string process , string appdomain , long ? processId , bool hasSymbol = false , bool isDynamic = false )
35+ {
36+ Name = name ;
37+ Path = path ;
38+ Optimized = optimized ;
39+ SymbolStatus = symbolStatus ;
40+ SymbolFile = symbolFile ;
41+ Order = order . GetValueOrDefault ( - 1 ) ;
42+ TimeStamp = timestamp ;
43+ Address = address ;
44+ Process = process ;
45+ AppDomain = appdomain ;
46+ Version = version ;
47+ UserCode = userCode ;
48+ ProcessId = processId ;
49+ IsDynamic = isDynamic ;
50+ HasSymbols = hasSymbol ;
51+ }
52+
53+ public Assembly ( string path )
54+ {
55+ Path = path ;
56+ }
57+
58+ /// <summary>
59+ /// Represents the name of the assembly.
60+ /// </summary>
61+ public string Name { get ; private set ; }
62+
63+ /// <summary>
64+ /// Represents the local path of the assembly is loaded from.
65+ /// </summary>
66+ public string Path { get ; private set ; }
67+
68+ /// <summary>
69+ /// Shows if the assembly has been optimized, true if the assembly is optimized.
70+ /// </summary>
71+ public bool Optimized { get ; private set ; }
72+
73+ /// <summary>
74+ /// Shows if the assembly is considered 'user code' by a debugger that supports 'Just My Code'.True if it's considered.
75+ /// </summary>
76+ public bool UserCode { get ; private set ; }
77+
78+ /// <summary>
79+ /// Represents the Description on if symbols were found for the assembly (ex: 'Symbols Loaded', 'Symbols not found', etc.
80+ /// </summary>
81+ public string SymbolStatus { get ; private set ; }
82+
83+ /// <summary>
84+ /// Represents the Logical full path to the symbol file. The exact definition is implementation defined.
85+ /// </summary>
86+ public string SymbolFile { get ; private set ; }
87+
88+ /// <summary>
89+ /// Represents the order in which the assembly was loaded.
90+ /// </summary>
91+ public int Order { get ; private set ; } = - 1 ;
92+
93+ /// <summary>
94+ /// Represents the version of assembly.
95+ /// </summary>
96+ public string Version { get ; private set ; }
97+
98+ /// <summary>
99+ /// Represents the time when the assembly was built in the units of UNIX timestamp formatted as a 64-bit unsigned decimal number in a string.
100+ /// </summary>
101+ public string TimeStamp { get ; private set ; }
102+
103+ /// <summary>
104+ /// Represents the Address where the assembly was loaded as a 64-bit unsigned decimal number.
105+ /// </summary>
106+ public string Address { get ; private set ; }
107+
108+ /// <summary>
109+ /// Represent the process name and process ID the assembly is loaded.
110+ /// </summary>
111+ public string Process { get ; private set ; }
112+
113+ /// <summary>
114+ /// Represent the name of the AppDomain where the assembly is loaded.
115+ /// </summary>
116+ public string AppDomain { get ; private set ; }
117+
118+ /// <summary>
119+ /// Represent the process ID the assembly is loaded.
120+ /// </summary>
121+ public long ? ProcessId { get ; private set ; } = - 1 ;
122+
123+ /// <summary>
124+ /// Indicates if the assembly has symbol file. Mainly use for mono project.
125+ /// </summary>
126+ public bool HasSymbols { get ; private set ; }
127+
128+ /// <summary>
129+ /// Indicate if the assembly is a dynamic. Mainly use for mono project.
130+ /// </summary>
131+ public bool IsDynamic { get ; private set ; }
132+ }
133+ }
0 commit comments