Fix metodi internal
This commit is contained in:
@@ -203,6 +203,7 @@
|
||||
<Compile Include="IobWinStatus.cs" />
|
||||
<Compile Include="Iob\BaseObj.cs" />
|
||||
<Compile Include="Iob\Services\DataSerializer.cs" />
|
||||
<Compile Include="Iob\Services\HttpService.cs" />
|
||||
<Compile Include="Iob\Services\XmlDataSerializer.cs" />
|
||||
<Compile Include="JobTask2Exe.cs" />
|
||||
<Compile Include="MeasureUtils.cs" />
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace IOB_UT_NEXT.Iob.Services
|
||||
/// </summary>
|
||||
public class HttpService
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Effettua chiamata URL e restituisce risultato, SE NON E' in veto send.
|
||||
/// </summary>
|
||||
@@ -304,5 +306,7 @@ namespace IOB_UT_NEXT.Iob.Services
|
||||
baseUtils.TrackUrlCall(url, sw.Elapsed);
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
-32
@@ -1022,47 +1022,23 @@ namespace IOB_UT_NEXT
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
#region Internal Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe logger
|
||||
/// </summary>
|
||||
protected static Logger lg = LogManager.GetCurrentClassLogger();
|
||||
internal static Logger lg = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Protected Fields
|
||||
#endregion Internal Fields
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Client HTTP statico e riutilizzabile per tutto il ciclo di vita dell'app
|
||||
/// </summary>
|
||||
private static readonly HttpClient _httpClient = new HttpClient();
|
||||
|
||||
/// <summary>
|
||||
/// Ultima ora registrata x statistiche track urlCall
|
||||
/// </summary>
|
||||
private static string LastHourCurr = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario dei valori bloccati x evitare log eccessivo
|
||||
/// </summary>
|
||||
private static Dictionary<string, DateTime> vetoLogError = new Dictionary<string, DateTime>();
|
||||
|
||||
/// <summary>
|
||||
/// Periodo di veto log in minuti
|
||||
/// </summary>
|
||||
private static int vetoPeriodMin = 30;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
#region Internal Methods
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se il log di un dato errore sia permesso
|
||||
/// </summary>
|
||||
/// <param name="logKey">ID del valore log da loggare/verificare</param>
|
||||
/// <returns></returns>
|
||||
private static bool logValuePermit(string logKey)
|
||||
internal static bool logValuePermit(string logKey)
|
||||
{
|
||||
bool doLog = false;
|
||||
if (vetoLogError.ContainsKey(logKey))
|
||||
@@ -1088,7 +1064,7 @@ namespace IOB_UT_NEXT
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">URL chiamato</param>
|
||||
/// <param name="elapsed">durata chiamata</param>
|
||||
private static void TrackUrlCall(string rawUrl, TimeSpan elapsed)
|
||||
internal static void TrackUrlCall(string rawUrl, TimeSpan elapsed)
|
||||
{
|
||||
// per l'URL tengo solo fino a prima dei parametri (prima di ?)
|
||||
string url = StripQueryAndFragment(rawUrl);
|
||||
@@ -1118,7 +1094,30 @@ namespace IOB_UT_NEXT
|
||||
CallMetricsCollector.AddCall(url, elapsed);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Client HTTP statico e riutilizzabile per tutto il ciclo di vita dell'app
|
||||
/// </summary>
|
||||
private static readonly HttpClient _httpClient = new HttpClient();
|
||||
|
||||
/// <summary>
|
||||
/// Ultima ora registrata x statistiche track urlCall
|
||||
/// </summary>
|
||||
private static string LastHourCurr = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario dei valori bloccati x evitare log eccessivo
|
||||
/// </summary>
|
||||
private static Dictionary<string, DateTime> vetoLogError = new Dictionary<string, DateTime>();
|
||||
|
||||
/// <summary>
|
||||
/// Periodo di veto log in minuti
|
||||
/// </summary>
|
||||
private static int vetoPeriodMin = 30;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user