Skip to content

Commit 58c37c4

Browse files
committed
Add accesibility modifiers
- Also rename fields to follow code style.
1 parent 1a70b1a commit 58c37c4

File tree

5 files changed

+112
-116
lines changed

5 files changed

+112
-116
lines changed

vs-extension.shared/CorDebug/CorDebugAssembly.cs

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) .NET Foundation and Contributors
33
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
44
// See LICENSE file in the project root for full license information.
@@ -18,23 +18,23 @@ namespace nanoFramework.Tools.VisualStudio.Extension
1818
{
1919
public class CorDebugAssembly : ICorDebugAssembly, ICorDebugModule, ICorDebugModule2, IDisposable
2020
{
21-
CorDebugAppDomain _appDomain;
22-
CorDebugProcess _process;
23-
Hashtable _clrTokensToPdbx;
24-
Hashtable _nanoCLRTokensToPdbx;
25-
PdbxFile _pdbxFile;
26-
Assembly _pdbxAssembly;
27-
IMetaDataImport _iMetaDataImport;
28-
uint _idx;
29-
string _name;
30-
string _path;
31-
ulong _dummyBaseAddress;
32-
FileStream _fileStream;
33-
CorDebugAssembly _primaryAssembly;
34-
bool _isFrameworkAssembly;
21+
private CorDebugAppDomain _appDomain;
22+
private CorDebugProcess _process;
23+
private Hashtable _clrTokensToPdbx;
24+
private Hashtable _nanoCLRTokensToPdbx;
25+
private PdbxFile _pdbxFile;
26+
private Assembly _pdbxAssembly;
27+
private IMetaDataImport _iMetaDataImport;
28+
private uint _idx;
29+
private string _name;
30+
private string _path;
31+
private ulong _dummyBaseAddress;
32+
private FileStream _fileStream;
33+
private CorDebugAssembly _primaryAssembly;
34+
private bool _isFrameworkAssembly;
3535

3636
// this list holds the official assemblies name
37-
List<string> frameworkAssemblies_v1_0 = new List<string> {
37+
private List<string> frameworkAssemblies_v1_0 = new List<string> {
3838
"mscorlib",
3939
"nanoframework.hardware.esp32",
4040
"nanoframework.networking.sntp",

vs-extension.shared/CorDebug/CorDebugClass.cs

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) .NET Foundation and Contributors
33
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
44
// See LICENSE file in the project root for full license information.
@@ -12,31 +12,31 @@ namespace nanoFramework.Tools.VisualStudio.Extension
1212
{
1313
public class CorDebugClass : ICorDebugClass, ICorDebugClass2
1414
{
15-
CorDebugAssembly m_assembly;
16-
Class m_pdbxClass;
17-
TypeSpec m_pdbxTypeSpec;
18-
uint m_tkSymbolless;
15+
private CorDebugAssembly _assembly;
16+
private Class _pdbxClass;
17+
private TypeSpec _pdbxTypeSpec;
18+
private uint _tkSymbolless;
1919

2020
public CorDebugClass(CorDebugAssembly assembly, TypeSpec typeSpec)
2121
{
22-
m_assembly = assembly;
23-
m_pdbxTypeSpec = typeSpec;
24-
m_pdbxClass = null;
22+
_assembly = assembly;
23+
_pdbxTypeSpec = typeSpec;
24+
_pdbxClass = null;
2525
}
2626

2727
public CorDebugClass(CorDebugAssembly assembly, Class cls)
2828
{
29-
m_assembly = assembly;
30-
m_pdbxClass = cls;
31-
m_pdbxTypeSpec = null;
29+
_assembly = assembly;
30+
_pdbxClass = cls;
31+
_pdbxTypeSpec = null;
3232
}
3333

3434
public CorDebugClass(CorDebugAssembly assembly, uint tkSymbolless)
3535
{
36-
m_tkSymbolless = tkSymbolless;
37-
m_assembly = assembly;
38-
m_pdbxClass = null;
39-
m_pdbxTypeSpec = null;
36+
_tkSymbolless = tkSymbolless;
37+
_assembly = assembly;
38+
_pdbxClass = null;
39+
_pdbxTypeSpec = null;
4040
}
4141

4242
public ICorDebugClass ICorDebugClass
@@ -52,16 +52,16 @@ public ICorDebugClass2 ICorDebugClass2
5252
public CorDebugAssembly Assembly
5353
{
5454
[DebuggerHidden]
55-
get { return m_assembly; }
55+
get { return _assembly; }
5656
}
5757

5858
public bool IsEnum
5959
{
6060
get
6161
{
62-
if (HasSymbols && m_pdbxClass != null)
62+
if (HasSymbols && _pdbxClass != null)
6363
{
64-
return m_pdbxClass.IsEnum;
64+
return _pdbxClass.IsEnum;
6565
}
6666
else
6767
{
@@ -91,25 +91,25 @@ public CorDebugAppDomain AppDomain
9191
public Class PdbxClass
9292
{
9393
[DebuggerHidden]
94-
get { return m_pdbxClass; }
94+
get { return _pdbxClass; }
9595
}
9696

9797
public TypeSpec PdbxTypeSpec
9898
{
9999
[DebuggerHidden]
100-
get { return m_pdbxTypeSpec; }
100+
get { return _pdbxTypeSpec; }
101101
}
102102

103103
public bool HasSymbols
104104
{
105-
get { return (m_pdbxClass != null || m_pdbxTypeSpec != null); }
105+
get { return (_pdbxClass != null || _pdbxTypeSpec != null); }
106106
}
107107

108108
public uint TypeDef_Index
109109
{
110110
get
111111
{
112-
uint tk = HasSymbols ? m_pdbxClass.Token.NanoCLRToken : m_tkSymbolless;
112+
uint tk = HasSymbols ? _pdbxClass.Token.NanoCLRToken : _tkSymbolless;
113113

114114
return nanoCLR_TypeSystem.ClassMemberIndexFromnanoCLRToken(tk, Assembly);
115115
}
@@ -119,7 +119,7 @@ public uint TypeSpec_Index
119119
{
120120
get
121121
{
122-
uint tk = HasSymbols ? m_pdbxTypeSpec.Token.NanoCLRToken : m_tkSymbolless;
122+
uint tk = HasSymbols ? _pdbxTypeSpec.Token.NanoCLRToken : _tkSymbolless;
123123

124124
return nanoCLR_TypeSystem.ClassMemberIndexFromnanoCLRToken(tk, Assembly);
125125
}
@@ -129,14 +129,14 @@ public uint TypeSpec_Index
129129

130130
int ICorDebugClass.GetModule(out ICorDebugModule pModule)
131131
{
132-
pModule = m_assembly;
132+
pModule = _assembly;
133133

134134
return COM_HResults.S_OK;
135135
}
136136

137137
int ICorDebugClass.GetToken(out uint pTypeDef)
138138
{
139-
pTypeDef = HasSymbols ? m_pdbxClass.Token.CLRToken : m_tkSymbolless;
139+
pTypeDef = HasSymbols ? _pdbxClass.Token.CLRToken : _tkSymbolless;
140140

141141
return COM_HResults.S_OK;
142142
}
@@ -176,10 +176,10 @@ int ICorDebugClass2.SetJMCStatus(int bIsJustMyCode)
176176
{
177177
if (Engine.Info_SetJMC(fJMC, ReflectionDefinition.Kind.REFLECTION_TYPE, TypeDef_Index))
178178
{
179-
if (!m_assembly.IsFrameworkAssembly)
179+
if (!_assembly.IsFrameworkAssembly)
180180
{
181181
//now update the debugger JMC state...
182-
foreach (Method m in m_pdbxClass.Methods)
182+
foreach (Method m in _pdbxClass.Methods)
183183
{
184184
m.IsJMC = fJMC;
185185
}

vs-extension.shared/CorDebug/CorDebugCode.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) .NET Foundation and Contributors
33
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
44
// See LICENSE file in the project root for full license information.
@@ -10,11 +10,11 @@ namespace nanoFramework.Tools.VisualStudio.Extension
1010
{
1111
public class CorDebugCode : ICorDebugCode
1212
{
13-
CorDebugFunction m_function;
13+
private CorDebugFunction _function;
1414

1515
public CorDebugCode(CorDebugFunction function)
1616
{
17-
m_function = function;
17+
_function = function;
1818
}
1919

2020

@@ -38,7 +38,7 @@ int ICorDebugCode.GetEnCRemapSequencePoints(uint cMap, out uint pcMap, uint[] of
3838

3939
int ICorDebugCode.CreateBreakpoint(uint offset, out ICorDebugFunctionBreakpoint ppBreakpoint)
4040
{
41-
ppBreakpoint = new CorDebugFunctionBreakpoint(m_function, offset);
41+
ppBreakpoint = new CorDebugFunctionBreakpoint(_function, offset);
4242

4343
return COM_HResults.S_OK;
4444
}
@@ -64,7 +64,7 @@ int ICorDebugCode.GetILToNativeMapping(uint cMap, out uint pcMap, COR_DEBUG_IL_T
6464
int pbIsJustMyCode;
6565
pcMap = 0;
6666

67-
m_function.ICorDebugFunction2.GetJMCStatus(out pbIsJustMyCode);
67+
_function.ICorDebugFunction2.GetJMCStatus(out pbIsJustMyCode);
6868

6969
//
7070
// REQUIRED FOR 'JUST MY CODE'
@@ -111,7 +111,7 @@ int ICorDebugCode.IsIL(out int pbIL)
111111

112112
int ICorDebugCode.GetFunction(out ICorDebugFunction ppFunction)
113113
{
114-
ppFunction = m_function;
114+
ppFunction = _function;
115115

116116
return COM_HResults.S_OK;
117117
}

0 commit comments

Comments
 (0)