├── .vs
└── SingletonPattern
│ └── v15
│ ├── .suo
│ └── sqlite3
│ └── storage.ide
├── NotThreadSafe
├── App.config
├── NotThreadSafe.csproj
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── Singleton.cs
├── bin
│ └── Debug
│ │ ├── NotThreadSafe.exe
│ │ ├── NotThreadSafe.exe.config
│ │ ├── NotThreadSafe.pdb
│ │ ├── NotThreadSafe.vshost.exe
│ │ ├── NotThreadSafe.vshost.exe.config
│ │ └── NotThreadSafe.vshost.exe.manifest
└── obj
│ └── Debug
│ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── NotThreadSafe.csproj.CoreCompileInputs.cache
│ ├── NotThreadSafe.csproj.FileListAbsolute.txt
│ ├── NotThreadSafe.csprojResolveAssemblyReference.cache
│ ├── NotThreadSafe.exe
│ ├── NotThreadSafe.pdb
│ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
├── SimpleThreadSafe
├── App.config
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── SimpleThreadSafe.csproj
├── Singleton.cs
├── bin
│ └── Debug
│ │ ├── SimpleThreadSafe.exe
│ │ ├── SimpleThreadSafe.exe.config
│ │ ├── SimpleThreadSafe.pdb
│ │ ├── SimpleThreadSafe.vshost.exe
│ │ ├── SimpleThreadSafe.vshost.exe.config
│ │ └── SimpleThreadSafe.vshost.exe.manifest
└── obj
│ └── Debug
│ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── SimpleThreadSafe.csproj.CoreCompileInputs.cache
│ ├── SimpleThreadSafe.csproj.FileListAbsolute.txt
│ ├── SimpleThreadSafe.csprojResolveAssemblyReference.cache
│ ├── SimpleThreadSafe.exe
│ ├── SimpleThreadSafe.pdb
│ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
├── SingletonPattern.sln
├── SingletonPattern.v12.suo
└── ThreadSafe
├── App.config
├── LazySingleton.cs
├── Program.cs
├── Properties
└── AssemblyInfo.cs
├── ThreadSafe.csproj
├── bin
└── Debug
│ ├── ThreadSafe.exe
│ ├── ThreadSafe.exe.config
│ ├── ThreadSafe.pdb
│ ├── ThreadSafe.vshost.exe
│ ├── ThreadSafe.vshost.exe.config
│ └── ThreadSafe.vshost.exe.manifest
└── obj
└── Debug
├── DesignTimeResolveAssemblyReferencesInput.cache
├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
├── ThreadSafe.csproj.CoreCompileInputs.cache
├── ThreadSafe.csproj.FileListAbsolute.txt
├── ThreadSafe.csprojResolveAssemblyReference.cache
├── ThreadSafe.exe
└── ThreadSafe.pdb
/.vs/SingletonPattern/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/.vs/SingletonPattern/v15/.suo
--------------------------------------------------------------------------------
/.vs/SingletonPattern/v15/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/.vs/SingletonPattern/v15/sqlite3/storage.ide
--------------------------------------------------------------------------------
/NotThreadSafe/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/NotThreadSafe/NotThreadSafe.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {2AF8ECD3-2C3C-464A-BEB7-D577C1689113}
8 | Exe
9 | Properties
10 | NotThreadSafe
11 | NotThreadSafe
12 | v4.5.1
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
60 |
--------------------------------------------------------------------------------
/NotThreadSafe/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace NotThreadSafe
8 | {
9 | class Program
10 | {
11 | static void Main(string[] args)
12 | {
13 | //Call Singleton's Method
14 | Singleton.Instance.SomeMethod();
15 |
16 | //Assign to another variable
17 | var obj = Singleton.Instance;
18 | obj.SomeMethod();
19 |
20 | //Pass as parameter
21 | SomeOtherMethod(Singleton.Instance);
22 |
23 |
24 | }
25 |
26 | private static void SomeOtherMethod(Singleton singleton)
27 | {
28 | singleton.SomeMethod();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/NotThreadSafe/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NotThreadSafe")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("NotThreadSafe")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e6bc8a0f-6660-44e0-943c-f2418fe5d830")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/NotThreadSafe/Singleton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace NotThreadSafe
8 | {
9 | public class Singleton
10 | {
11 | private static Singleton _instance;
12 |
13 | public Singleton()
14 | {
15 | }
16 |
17 | public static Singleton Instance
18 | {
19 | get
20 | {
21 | if(_instance == null)
22 | {
23 | _instance = new Singleton();
24 | }
25 | return _instance;
26 | }
27 | }
28 |
29 | public void SomeMethod()
30 | {
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/NotThreadSafe/bin/Debug/NotThreadSafe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/bin/Debug/NotThreadSafe.exe
--------------------------------------------------------------------------------
/NotThreadSafe/bin/Debug/NotThreadSafe.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/NotThreadSafe/bin/Debug/NotThreadSafe.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/bin/Debug/NotThreadSafe.pdb
--------------------------------------------------------------------------------
/NotThreadSafe/bin/Debug/NotThreadSafe.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/bin/Debug/NotThreadSafe.vshost.exe
--------------------------------------------------------------------------------
/NotThreadSafe/bin/Debug/NotThreadSafe.vshost.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/NotThreadSafe/bin/Debug/NotThreadSafe.vshost.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/NotThreadSafe.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 67c6adfee66eaac382a6769175b3a52675fe8dac
2 |
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/NotThreadSafe.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | F:\Mansi\RND\DP\SingletonPattern\NotThreadSafe\bin\Debug\NotThreadSafe.exe.config
2 | F:\Mansi\RND\DP\SingletonPattern\NotThreadSafe\obj\Debug\NotThreadSafe.csprojResolveAssemblyReference.cache
3 | F:\Mansi\RND\DP\SingletonPattern\NotThreadSafe\bin\Debug\NotThreadSafe.exe
4 | F:\Mansi\RND\DP\SingletonPattern\NotThreadSafe\bin\Debug\NotThreadSafe.pdb
5 | F:\Mansi\RND\DP\SingletonPattern\NotThreadSafe\obj\Debug\NotThreadSafe.exe
6 | F:\Mansi\RND\DP\SingletonPattern\NotThreadSafe\obj\Debug\NotThreadSafe.pdb
7 | F:\AKKI_DEV\RND\DP\SingletonPattern\NotThreadSafe\bin\Debug\NotThreadSafe.exe.config
8 | F:\AKKI_DEV\RND\DP\SingletonPattern\NotThreadSafe\obj\Debug\NotThreadSafe.exe
9 | F:\AKKI_DEV\RND\DP\SingletonPattern\NotThreadSafe\obj\Debug\NotThreadSafe.pdb
10 |
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/NotThreadSafe.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/obj/Debug/NotThreadSafe.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/NotThreadSafe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/obj/Debug/NotThreadSafe.exe
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/NotThreadSafe.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/obj/Debug/NotThreadSafe.pdb
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/NotThreadSafe/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/NotThreadSafe/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/SimpleThreadSafe/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SimpleThreadSafe
8 | {
9 | class Program
10 | {
11 | static void Main(string[] args)
12 | {
13 | Singleton objSingleton = Singleton.Instance;
14 |
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SimpleThreadSafe")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SimpleThreadSafe")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("5674ea2f-4147-4642-a73d-6d2f1ade7b59")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/SimpleThreadSafe.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {CDEDBCCD-7B81-447A-A72F-0CFC4FB33C64}
8 | Exe
9 | Properties
10 | SimpleThreadSafe
11 | SimpleThreadSafe
12 | v4.5.1
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
60 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/Singleton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SimpleThreadSafe
8 | {
9 | public sealed class Singleton
10 | {
11 | private static volatile Singleton instance;
12 | private static object syncRoot = new Object();
13 |
14 | private Singleton()
15 | {
16 | }
17 |
18 | public static Singleton Instance
19 | {
20 | get
21 | {
22 | if (instance == null)
23 | {
24 | lock (syncRoot)
25 | {
26 | if (instance == null)
27 | instance = new Singleton();
28 | }
29 | }
30 |
31 | return instance;
32 | }
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.exe
--------------------------------------------------------------------------------
/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.pdb
--------------------------------------------------------------------------------
/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.vshost.exe
--------------------------------------------------------------------------------
/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.vshost.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/bin/Debug/SimpleThreadSafe.vshost.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 6413c743eb77380eebdb5fb8fe04a677427438c1
2 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | F:\AKKI_DEV\RND\DP\SingletonPattern\SimpleThreadSafe\bin\Debug\SimpleThreadSafe.exe.config
2 | F:\AKKI_DEV\RND\DP\SingletonPattern\SimpleThreadSafe\bin\Debug\SimpleThreadSafe.exe
3 | F:\AKKI_DEV\RND\DP\SingletonPattern\SimpleThreadSafe\bin\Debug\SimpleThreadSafe.pdb
4 | F:\AKKI_DEV\RND\DP\SingletonPattern\SimpleThreadSafe\obj\Debug\SimpleThreadSafe.csprojResolveAssemblyReference.cache
5 | F:\AKKI_DEV\RND\DP\SingletonPattern\SimpleThreadSafe\obj\Debug\SimpleThreadSafe.exe
6 | F:\AKKI_DEV\RND\DP\SingletonPattern\SimpleThreadSafe\obj\Debug\SimpleThreadSafe.pdb
7 |
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.exe
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/obj/Debug/SimpleThreadSafe.pdb
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/SimpleThreadSafe/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SimpleThreadSafe/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/SingletonPattern.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.31101.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotThreadSafe", "NotThreadSafe\NotThreadSafe.csproj", "{2AF8ECD3-2C3C-464A-BEB7-D577C1689113}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThreadSafe", "ThreadSafe\ThreadSafe.csproj", "{FE33BF2D-9402-43B3-B945-CF5EB173F378}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleThreadSafe", "SimpleThreadSafe\SimpleThreadSafe.csproj", "{CDEDBCCD-7B81-447A-A72F-0CFC4FB33C64}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {2AF8ECD3-2C3C-464A-BEB7-D577C1689113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {2AF8ECD3-2C3C-464A-BEB7-D577C1689113}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {2AF8ECD3-2C3C-464A-BEB7-D577C1689113}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {2AF8ECD3-2C3C-464A-BEB7-D577C1689113}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {FE33BF2D-9402-43B3-B945-CF5EB173F378}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {FE33BF2D-9402-43B3-B945-CF5EB173F378}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {FE33BF2D-9402-43B3-B945-CF5EB173F378}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {FE33BF2D-9402-43B3-B945-CF5EB173F378}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {CDEDBCCD-7B81-447A-A72F-0CFC4FB33C64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {CDEDBCCD-7B81-447A-A72F-0CFC4FB33C64}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {CDEDBCCD-7B81-447A-A72F-0CFC4FB33C64}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {CDEDBCCD-7B81-447A-A72F-0CFC4FB33C64}.Release|Any CPU.Build.0 = Release|Any CPU
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/SingletonPattern.v12.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/SingletonPattern.v12.suo
--------------------------------------------------------------------------------
/ThreadSafe/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ThreadSafe/LazySingleton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace ThreadSafe
8 | {
9 | public class LazySingleton
10 | {
11 | private LazySingleton()
12 | { }
13 |
14 | public static LazySingleton Instance
15 | {
16 | get
17 | {
18 | return Nested.instance;
19 | }
20 | }
21 |
22 | private class Nested
23 | {
24 | static Nested()
25 | { }
26 |
27 | internal static readonly LazySingleton instance = new LazySingleton();
28 | }
29 |
30 | public void SomeMethod()
31 | { }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ThreadSafe/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace ThreadSafe
8 | {
9 | class Program
10 | {
11 | static void Main(string[] args)
12 | {
13 | LazySingleton.Instance.SomeMethod();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ThreadSafe/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ThreadSafe")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ThreadSafe")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e8812bff-5eb0-4f0c-a97b-29fdae80d4b9")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ThreadSafe/ThreadSafe.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {FE33BF2D-9402-43B3-B945-CF5EB173F378}
8 | Exe
9 | Properties
10 | ThreadSafe
11 | ThreadSafe
12 | v4.5.1
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
60 |
--------------------------------------------------------------------------------
/ThreadSafe/bin/Debug/ThreadSafe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/bin/Debug/ThreadSafe.exe
--------------------------------------------------------------------------------
/ThreadSafe/bin/Debug/ThreadSafe.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ThreadSafe/bin/Debug/ThreadSafe.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/bin/Debug/ThreadSafe.pdb
--------------------------------------------------------------------------------
/ThreadSafe/bin/Debug/ThreadSafe.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/bin/Debug/ThreadSafe.vshost.exe
--------------------------------------------------------------------------------
/ThreadSafe/bin/Debug/ThreadSafe.vshost.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ThreadSafe/bin/Debug/ThreadSafe.vshost.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/ThreadSafe.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | c92a861c752874818d7e7cba618dceed094e42a5
2 |
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/ThreadSafe.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | F:\Mansi\RND\DP\SingletonPattern\ThreadSafe\bin\Debug\ThreadSafe.exe.config
2 | F:\Mansi\RND\DP\SingletonPattern\ThreadSafe\bin\Debug\ThreadSafe.exe
3 | F:\Mansi\RND\DP\SingletonPattern\ThreadSafe\bin\Debug\ThreadSafe.pdb
4 | F:\Mansi\RND\DP\SingletonPattern\ThreadSafe\obj\Debug\ThreadSafe.exe
5 | F:\Mansi\RND\DP\SingletonPattern\ThreadSafe\obj\Debug\ThreadSafe.pdb
6 | F:\Mansi\RND\DP\SingletonPattern\ThreadSafe\obj\Debug\ThreadSafe.csprojResolveAssemblyReference.cache
7 |
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/ThreadSafe.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/obj/Debug/ThreadSafe.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/ThreadSafe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/obj/Debug/ThreadSafe.exe
--------------------------------------------------------------------------------
/ThreadSafe/obj/Debug/ThreadSafe.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akshayblevel/Singleton-Design-Pattern/4b49870973c1fb9dac72a715c12c0934f4ab7183/ThreadSafe/obj/Debug/ThreadSafe.pdb
--------------------------------------------------------------------------------