File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
React.Sample.Mvc4/App_Start Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public static class ReactConfig
15
15
{
16
16
public static void Configure ( )
17
17
{
18
- ReactSiteConfiguration . Configuration = new ReactSiteConfiguration ( )
18
+ ReactSiteConfiguration . Configuration
19
19
. AddScript ( "~/Content/Sample.jsx" ) ;
20
20
}
21
21
}
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ public void SetUp()
40
40
_environment . Object ,
41
41
_cache . Object ,
42
42
_fileSystem . Object ,
43
- _fileCacheHash . Object
43
+ _fileCacheHash . Object ,
44
+ ReactSiteConfiguration . Configuration
44
45
) ;
45
46
}
46
47
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ namespace React
17
17
/// </summary>
18
18
public class ReactSiteConfiguration : IReactSiteConfiguration
19
19
{
20
+ private static IReactSiteConfiguration _instance = new ReactSiteConfiguration ( ) ;
21
+
20
22
/// <summary>
21
23
/// All the scripts that have been added to this configuration
22
24
/// </summary>
@@ -25,7 +27,13 @@ public class ReactSiteConfiguration : IReactSiteConfiguration
25
27
/// <summary>
26
28
/// Gets or sets the site-side configuration
27
29
/// </summary>
28
- public static IReactSiteConfiguration Configuration { get ; set ; }
30
+ public static IReactSiteConfiguration Configuration
31
+ {
32
+ get
33
+ {
34
+ return _instance ;
35
+ }
36
+ }
29
37
30
38
/// <summary>
31
39
/// Adds a script to the list of scripts that are executed. This should be called for all
You can’t perform that action at this time.
0 commit comments