Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Volkov committed Jul 14, 2020
1 parent 3dd96ff commit d6d8eda
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.1")]
[assembly: AssemblyFileVersion("1.0.0.1")]
[assembly: AssemblyVersion("1.0.0.2")]
[assembly: AssemblyFileVersion("1.0.0.2")]
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;

namespace Maximus.Library.Helpers
{
Expand Down Expand Up @@ -137,7 +138,7 @@ public static double ConvertBytes1024(decimal fromBytes, BinaryPrefix fromUnit,
if (valueList.Length == 0)
return string.Empty;
string Result = "";
foreach (var value in valueList)
foreach (object value in valueList)
Result += value.ToString() + separator;
return Result.Substring(0, Result.Length - separator.Length);
}
Expand All @@ -149,7 +150,7 @@ public static double ConvertBytes1024(decimal fromBytes, BinaryPrefix fromUnit,
if (valueDictionary.Keys.Count == 0)
return string.Empty;
string Result = "";
foreach (var pair in valueDictionary)
foreach (KeyValuePair<string, object> pair in valueDictionary)
Result += pair.Key.ToString() + namevalueSeparator + pair.Value.ToString() + itemSeparator;
return Result.Substring(0, Result.Length - itemSeparator.Length);
}
Expand All @@ -161,13 +162,17 @@ public static double ConvertBytes1024(decimal fromBytes, BinaryPrefix fromUnit,
if (valueDictionary.Keys.Count == 0)
return string.Empty;
string Result = "";
foreach (var pair in valueDictionary)
foreach (KeyValuePair<string, double> pair in valueDictionary)
Result += pair.Key.ToString() + namevalueSeparator + pair.Value.ToString(doubleFormat) + itemSeparator;
return Result.Substring(0, Result.Length - itemSeparator.Length);
}

public static string EnumElements(IEnumerable<object> inputObjects, string separator = "; ")
{
if (inputObjects == null)
return string.Empty;
if (!inputObjects.Any())
return string.Empty;
string Result = "";
foreach (object obj in inputObjects)
Result += obj.ToString() + separator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void WriteVerbose(string debugInfo, string component, string source, int
public void WriteInformation(string message, object Src, params object[] stringFormatArgs)
{
#if DEBUG // using only text file logging in DEBUG release
logWriteVerbose(message, "", "", 0);
WriteVerbose(message, "", "", 0);
#else
if (EventLoggingLevel >= EventLoggingLevel.Informational)
WriteEvent(message, EventLogEntryType.Information, Src, stringFormatArgs);
Expand All @@ -163,7 +163,7 @@ public void WriteInformation(string message, object Src, params object[] stringF
public void WriteWarning(string message, object Src, params object[] stringFormatArgs)
{
#if DEBUG // using only text file logging in DEBUG release
logWriteVerbose(message, "", "", 1);
WriteVerbose(message, "", "", 1);
#else
if (EventLoggingLevel >= EventLoggingLevel.Warning)
WriteEvent(message, EventLogEntryType.Warning, Src, stringFormatArgs);
Expand All @@ -172,7 +172,7 @@ public void WriteWarning(string message, object Src, params object[] stringForma
public void WriteError(string message, object Src, params object[] stringFormatArgs)
{
#if DEBUG // using only text file logging in DEBUG release
logWriteVerbose(message, "", "", 2);
WriteVerbose(message, "", "", 2);
#else
if (EventLoggingLevel >= EventLoggingLevel.Error)
WriteEvent(message, EventLogEntryType.Error, Src, stringFormatArgs);
Expand Down
2 changes: 1 addition & 1 deletion Maximus.Base.Library/Assembly.mpx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Comment="Base assembly for SCOM Console extensions. Must not be referenced in Module Type projects. Must not be referenced together with base managed workflow library." />
<DeployableAssembly ID="Maximus.Base.Library.ManagedWorkflowBase.DeployableAssembly" Accessibility="Public" HasNullStream="false"
FileName="Maximus.Base.Library.ManagedWorkflowBase.dll"
QualifiedName="Maximus.Base.Library.ManagedWorkflowBase, Version=1.0.0.1, Culture=neutral, PublicKeyToken=fd5098a6a3259696"
QualifiedName="Maximus.Base.Library.ManagedWorkflowBase, Version=1.0.0.2, Culture=neutral, PublicKeyToken=fd5098a6a3259696"
Comment="Base library for managed workflow. Must not be used in SCOM Console extension projects. Must not be referenced with base console extension library." />
<DeployableAssembly ID="Maximus.Base.Library.Newtonsoft.Json.DeployableAssembly" Accessibility="Public" HasNullStream="false"
QualifiedName="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed"
Expand Down
Binary file modified Maximus.Base.Library/MPResources.resources
Binary file not shown.

0 comments on commit d6d8eda

Please sign in to comment.