File tree 7 files changed +51
-14
lines changed
7 files changed +51
-14
lines changed Original file line number Diff line number Diff line change
1
+ * .swp
2
+ * . * ~
3
+ project.lock.json
4
+ .DS_Store
5
+ * .pyc
6
+ nupkg /
7
+
8
+ # Visual Studio Code
9
+ .vscode
10
+
11
+ # Rider
12
+ .idea
13
+
14
+ # User-specific files
15
+ * .suo
16
+ * .user
17
+ * .userosscache
18
+ * .sln.docstates
19
+
20
+ # Build results
21
+ [Dd ]ebug /
22
+ [Dd ]ebugPublic /
23
+ [Rr ]elease /
24
+ [Rr ]eleases /
25
+ x64 /
26
+ x86 /
27
+ build /
28
+ bld /
29
+ [Bb ]in /
30
+ [Oo ]bj /
31
+ [Oo ]ut /
32
+ msbuild.log
33
+ msbuild.err
34
+ msbuild.wrn
35
+
36
+ # Visual Studio 2015
37
+ .vs /
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public class Controller: IController
59
59
public Controller ( string key )
60
60
{
61
61
multitonKey = key ;
62
- InstanceMap . TryAdd ( multitonKey , new Lazy < IController > ( this ) ) ;
62
+ InstanceMap . TryAdd ( multitonKey , new Lazy < IController > ( ( ) => this ) ) ;
63
63
commandMap = new ConcurrentDictionary < string , Func < ICommand > > ( ) ;
64
64
InitializeController ( ) ;
65
65
}
@@ -97,7 +97,7 @@ protected virtual void InitializeController()
97
97
/// <returns>the Multiton instance of <c>Controller</c></returns>
98
98
public static IController GetInstance ( string key , Func < string , IController > factory )
99
99
{
100
- return InstanceMap . GetOrAdd ( key , new Lazy < IController > ( factory ( key ) ) ) . Value ;
100
+ return InstanceMap . GetOrAdd ( key , new Lazy < IController > ( ( ) => factory ( key ) ) ) . Value ;
101
101
}
102
102
103
103
/// <summary>
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public class Model: IModel
47
47
public Model ( string key )
48
48
{
49
49
multitonKey = key ;
50
- InstanceMap . TryAdd ( key , new Lazy < IModel > ( this ) ) ;
50
+ InstanceMap . TryAdd ( key , new Lazy < IModel > ( ( ) => this ) ) ;
51
51
proxyMap = new ConcurrentDictionary < string , IProxy > ( ) ;
52
52
InitializeModel ( ) ;
53
53
}
@@ -75,7 +75,7 @@ protected virtual void InitializeModel()
75
75
/// <returns>the instance for this Multiton key </returns>
76
76
public static IModel GetInstance ( string key , Func < string , IModel > factory )
77
77
{
78
- return InstanceMap . GetOrAdd ( key , new Lazy < IModel > ( factory ( key ) ) ) . Value ;
78
+ return InstanceMap . GetOrAdd ( key , new Lazy < IModel > ( ( ) => factory ( key ) ) ) . Value ;
79
79
}
80
80
81
81
/// <summary>
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public class View: IView
47
47
public View ( string key )
48
48
{
49
49
multitonKey = key ;
50
- InstanceMap . TryAdd ( key , new Lazy < IView > ( this ) ) ;
50
+ InstanceMap . TryAdd ( key , new Lazy < IView > ( ( ) => this ) ) ;
51
51
mediatorMap = new ConcurrentDictionary < string , IMediator > ( ) ;
52
52
observerMap = new ConcurrentDictionary < string , IList < IObserver > > ( ) ;
53
53
InitializeView ( ) ;
@@ -76,7 +76,7 @@ protected virtual void InitializeView()
76
76
/// <returns>the instance for this Multiton key </returns>
77
77
public static IView GetInstance ( string key , Func < string , IView > factory )
78
78
{
79
- return InstanceMap . GetOrAdd ( key , new Lazy < IView > ( factory ( key ) ) ) . Value ;
79
+ return InstanceMap . GetOrAdd ( key , new Lazy < IView > ( ( ) => factory ( key ) ) ) . Value ;
80
80
}
81
81
82
82
/// <summary>
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public class Facade: IFacade
37
37
public Facade ( string key )
38
38
{
39
39
InitializeNotifier ( key ) ;
40
- InstanceMap . TryAdd ( key , new Lazy < IFacade > ( this ) ) ;
40
+ InstanceMap . TryAdd ( key , new Lazy < IFacade > ( ( ) => this ) ) ;
41
41
InitializeFacade ( ) ;
42
42
}
43
43
@@ -66,7 +66,7 @@ protected virtual void InitializeFacade()
66
66
/// <returns>the Multiton instance of the Facade</returns>
67
67
public static IFacade GetInstance ( string key , Func < string , IFacade > factory )
68
68
{
69
- return InstanceMap . GetOrAdd ( key , new Lazy < IFacade > ( factory ( key ) ) ) . Value ;
69
+ return InstanceMap . GetOrAdd ( key , new Lazy < IFacade > ( ( ) => factory ( key ) ) ) . Value ;
70
70
}
71
71
72
72
/// <summary>
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >netcoreapp3 .0</TargetFramework >
4
+ <TargetFramework >net5 .0</TargetFramework >
5
5
<PackageId >PureMVC.Multicore</PackageId >
6
- <Version >2.1 .0</Version >
6
+ <Version >2.2 .0</Version >
7
7
<Description >PureMVC is a lightweight framework for creating applications based upon the classic Model-View-Controller design meta-pattern.</Description >
8
8
<Copyright >Copyright © 2017 Saad Shams, Futurescale, Inc.</Copyright >
9
9
<license >Creative Commons Attribution 3.0</license >
15
15
<Authors >Saad Shams</Authors >
16
16
<Company >Futurescale, Inc.</Company >
17
17
<PackageTags >PureMVC Multicore MVC</PackageTags >
18
- <AssemblyVersion >2.1 .0.0</AssemblyVersion >
19
- <FileVersion >2.1 .0.0</FileVersion >
18
+ <AssemblyVersion >2.2 .0.0</AssemblyVersion >
19
+ <FileVersion >2.2 .0.0</FileVersion >
20
20
<NeutralLanguage >en-US</NeutralLanguage >
21
21
<GeneratePackageOnBuild >True</GeneratePackageOnBuild >
22
22
</PropertyGroup >
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >netcoreapp3 .0</TargetFramework >
4
+ <TargetFramework >net5 .0</TargetFramework >
5
5
6
6
<IsPackable >false</IsPackable >
7
7
</PropertyGroup >
8
8
9
9
<ItemGroup >
10
- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.2 .0" />
10
+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.5 .0" />
11
11
<PackageReference Include =" MSTest.TestAdapter" Version =" 1.4.0" />
12
12
<PackageReference Include =" MSTest.TestFramework" Version =" 1.4.0" />
13
13
<PackageReference Include =" coverlet.collector" Version =" 1.0.1" />
You can’t perform that action at this time.
0 commit comments