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
1515 {
1616 public static void Configure ( )
1717 {
18- ReactSiteConfiguration . Configuration = new ReactSiteConfiguration ( )
18+ ReactSiteConfiguration . Configuration
1919 . AddScript ( "~/Content/Sample.jsx" ) ;
2020 }
2121 }
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ public void SetUp()
4040 _environment . Object ,
4141 _cache . Object ,
4242 _fileSystem . Object ,
43- _fileCacheHash . Object
43+ _fileCacheHash . Object ,
44+ ReactSiteConfiguration . Configuration
4445 ) ;
4546 }
4647
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ namespace React
1717 /// </summary>
1818 public class ReactSiteConfiguration : IReactSiteConfiguration
1919 {
20+ private static IReactSiteConfiguration _instance = new ReactSiteConfiguration ( ) ;
21+
2022 /// <summary>
2123 /// All the scripts that have been added to this configuration
2224 /// </summary>
@@ -25,7 +27,13 @@ public class ReactSiteConfiguration : IReactSiteConfiguration
2527 /// <summary>
2628 /// Gets or sets the site-side configuration
2729 /// </summary>
28- public static IReactSiteConfiguration Configuration { get ; set ; }
30+ public static IReactSiteConfiguration Configuration
31+ {
32+ get
33+ {
34+ return _instance ;
35+ }
36+ }
2937
3038 /// <summary>
3139 /// 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