PageRenderTime 27ms CodeModel.GetById 25ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Kilimanjaro_RTM/HelloWorld_CLR/HelloWorldService/vb/HelloWorldService/My Project/MySettings.vb

#
Visual Basic | 38 lines | 23 code | 7 blank | 8 comment | 0 complexity | 827da7d65b0dcc08ab8e954ebe626318 MD5 | raw file
 1'------------------------------------------------------------------------------
 2' <autogenerated>
 3'     This code was generated by a tool.
 4'
 5'     Changes to this file may cause incorrect behavior and will be lost if
 6'     the code is regenerated.
 7' </autogenerated>
 8'------------------------------------------------------------------------------
 9
10Option Strict Off
11Option Explicit On
12
13
14
15Partial Friend NotInheritable Class MySettings
16    Inherits System.Configuration.ApplicationSettingsBase
17
18    Private Shared m_Value As MySettings
19
20    Private Shared m_SyncObject As Object = New Object
21
22    <System.Diagnostics.DebuggerNonUserCode()> _
23    Public Shared ReadOnly Property Value() As MySettings
24        Get
25            If (MySettings.m_Value Is Nothing) Then
26                System.Threading.Monitor.Enter(MySettings.m_SyncObject)
27                If (MySettings.m_Value Is Nothing) Then
28                    Try
29                        MySettings.m_Value = New MySettings
30                    Finally
31                        System.Threading.Monitor.Exit(MySettings.m_SyncObject)
32                    End Try
33                End If
34            End If
35            Return MySettings.m_Value
36        End Get
37    End Property
38End Class