Commit ca09d8bb59f54d81bbe00112b637a7f250bbc721

Authored by Schwirg László
1 parent 10ecabc5

- csak egy-két név változtatás

Vrh.Web.Reporting/Global.asax.cs
... ... @@ -30,7 +30,7 @@ namespace Vrh.Web.Reporting
30 30 RouteConfig.RegisterRoutes(RouteTable.Routes);
31 31 BundleConfig.RegisterBundles(BundleTable.Bundles);
32 32  
33   - WebServerHostedServiceStarter.Init(typeof(Vrh.iScheduler.WAHostedMonitorHangfire));
  33 + WebServerHostedServiceStarter.Start(typeof(Vrh.iScheduler.WAHostedMonitorHangfire));
34 34 //IISHostedServiceStarter.Init(Vrh.iScheduler.WAHostedMonitorHangfire.Start, Vrh.iScheduler.WAHostedMonitorHangfire.Stop);
35 35 //IISHostedServiceStarter.Init(Vrh.iScheduler.WAHostedMonitor.Start, Vrh.iScheduler.WAHostedMonitor.Stop);
36 36  
... ...
Vrh.Web.Reporting/WebServerHostedServiceStarter.cs
... ... @@ -39,9 +39,9 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS
39 39 /// IWebServerHostedServiceStarter interfészt meg kell valósítsa, bár ezt nem ellenőrzi, csak azt,
40 40 /// hogy az ezt jelentő 'public static void Start();' és 'public static void Stop();' metódusok megvannak-e.
41 41 /// </param>
42   - public static void Init(Type tt)
  42 + public static void Start(Type tt)
43 43 {
44   - var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Init)}");
  44 + var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Start)}");
45 45 try
46 46 {
47 47 //if (!tt.GetInterfaces().Contains(typeof(IWebServerHostedServiceStarter))) throw new InterfaceErrorApplicationException(tt.FullName);
... ... @@ -66,9 +66,9 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS
66 66 /// </summary>
67 67 /// <param name="externalinitializerstartmethod">az indító metódus</param>
68 68 /// <param name="externalinitializerstopmethod">a leállító metódus</param>
69   - public static void Init(List<Type> ttList)
  69 + public static void Start(List<Type> ttList)
70 70 {
71   - var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Init)}");
  71 + var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Start)}");
72 72 try
73 73 {
74 74 //if (!tt.GetInterfaces().Contains(typeof(IInterface))) throw new Exception ($"{tt.FullName} does not implement {nameof(IInterface)}!");
... ... @@ -92,19 +92,14 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS
92 92 finally { le.Write(); }
93 93 }
94 94  
95   - private class InterfaceErrorApplicationException : ApplicationException
96   - {
97   - public InterfaceErrorApplicationException(string typename, string methodname) : base($"Class '{typename}' does not implement 'public static void {methodname}()' action!") { }
98   - public InterfaceErrorApplicationException(string typename) : base($"Class '{typename}' does not implement '{nameof(IWebServerHostedServiceStarter)}' interface!") { }
99   - }
100 95 /// <summary>
101 96 /// Egy hosted service elindítását, paraméterezését, konfigurálását és a külső iniciátor meghívást végzi.
102 97 /// </summary>
103 98 /// <param name="externalinitializerstartmethod">az indító metódus</param>
104 99 /// <param name="externalinitializerstopmethod">a leállító metódus</param>
105   - public static void Init(Action externalinitializerstartmethod, Action externalinitializerstopmethod)
  100 + public static void Start(Action externalinitializerstartmethod, Action externalinitializerstopmethod)
106 101 {
107   - var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Init)}");
  102 + var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Start)}");
108 103 try
109 104 {
110 105 _SetupAutoStart<WebServerHostedServiceStarter>(le: le);
... ... @@ -118,9 +113,9 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS
118 113 /// <summary>
119 114 /// Több hosted service elindítását, paraméterezését, konfigurálását és a külső iniciátorok meghívást végzi.
120 115 /// </summary>
121   - public static void Init(List<Tuple<Action, Action>> externalinitializerList)
  116 + public static void Start(List<Tuple<Action, Action>> externalinitializerList)
122 117 {
123   - var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Init)}");
  118 + var le = new DCLogEntry(LogLevel.Information, $"{typeof(WebServerHostedServiceStarter).FullName}.{nameof(Start)}");
124 119 try
125 120 {
126 121 _SetupAutoStart<WebServerHostedServiceStarter>(le: le);
... ... @@ -167,6 +162,11 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS
167 162  
168 163  
169 164 #region private members
  165 + private class InterfaceErrorApplicationException : ApplicationException
  166 + {
  167 + public InterfaceErrorApplicationException(string typename, string methodname) : base($"Class '{typename}' does not implement 'public static void {methodname}()' action!") { }
  168 + public InterfaceErrorApplicationException(string typename) : base($"Class '{typename}' does not implement '{nameof(IWebServerHostedServiceStarter)}' interface!") { }
  169 + }
170 170 void IRegisteredObject.Stop(bool immediate) { Stop(); }
171 171 private void _RegisterExternalInitializer(Action externalinitializerstartmethod, Action externalinitializerstopmethod, DCLogEntry le)
172 172 {
... ...