File tree Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ public sealed class VBEEvents : IVBEEvents
15
15
16
16
public static VBEEvents Initialize ( IVBE vbe )
17
17
{
18
- if ( _instance == null )
18
+ lock ( Lock )
19
19
{
20
- lock ( Lock )
20
+ if ( _instance == null )
21
21
{
22
22
_instance = new VBEEvents ( vbe ) ;
23
23
}
@@ -28,13 +28,13 @@ public static VBEEvents Initialize(IVBE vbe)
28
28
29
29
public static void Terminate ( )
30
30
{
31
- if ( _instance == null )
32
- {
33
- return ;
34
- }
35
-
36
31
lock ( Lock )
37
32
{
33
+ if ( _instance == null )
34
+ {
35
+ return ;
36
+ }
37
+
38
38
_instance . Dispose ( ) ;
39
39
_instance = null ;
40
40
}
Original file line number Diff line number Diff line change 147
147
<Compile Include =" Events\ProjectEventArgs.cs" />
148
148
<Compile Include =" Events\ProjectRenamedEventArgs.cs" />
149
149
<Compile Include =" Events\SelectionChangedEventArgs.cs" />
150
- <Compile Include =" Events\VbeEvents .cs" />
150
+ <Compile Include =" Events\VBEEvents .cs" />
151
151
<Compile Include =" Events\VBENativeServices.cs" />
152
152
<Compile Include =" Events\WindowChangedEventArgs.cs" />
153
153
<Compile Include =" Extensions\VBComponentExtensions.cs" />
Original file line number Diff line number Diff line change @@ -25,18 +25,18 @@ protected override void Dispose(bool disposing)
25
25
26
26
public void AttachEvents ( )
27
27
{
28
- if ( IsWrappingNullReference )
28
+ lock ( _lock )
29
29
{
30
- return ;
31
- }
30
+ if ( IsWrappingNullReference )
31
+ {
32
+ return ;
33
+ }
32
34
33
- if ( _cookie != NotAdvising )
34
- {
35
- return ;
36
- }
35
+ if ( _cookie != NotAdvising )
36
+ {
37
+ return ;
38
+ }
37
39
38
- lock ( _lock )
39
- {
40
40
// Call QueryInterface for IConnectionPointContainer
41
41
var icpc = ( IConnectionPointContainer ) Target ;
42
42
You can’t perform that action at this time.
0 commit comments