mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-10 18:24:53 +00:00
Tidying
This commit is contained in:
@@ -93,7 +93,7 @@ namespace ICD.Common.Utils
|
||||
{
|
||||
#if SIMPLSHARP
|
||||
Logger.AddEntry(eSeverity.Error, e, "{0} failed to cache assembly {1}", typeof(AttributeUtils).Name,
|
||||
assembly.GetName().Name);
|
||||
assembly.GetName().Name);
|
||||
#else
|
||||
Logger.AddEntry(eSeverity.Error, e, "{0} failed to cache assembly {1} - could not load type {2}",
|
||||
typeof(AttributeUtils).Name, assembly.GetName().Name, e.TypeName);
|
||||
@@ -166,9 +166,9 @@ namespace ICD.Common.Utils
|
||||
s_AttributeToMethodCache[attribute] = method;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Lookup
|
||||
#region Lookup
|
||||
|
||||
/// <summary>
|
||||
/// Gets the first attribute on the given class type matching the generic type.
|
||||
@@ -244,6 +244,6 @@ namespace ICD.Common.Utils
|
||||
return s_AttributeToMethodCache[attribute];
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using ICD.Common.Properties;
|
||||
using ICD.Common.Utils.IO;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
#else
|
||||
using System.Reflection;
|
||||
#endif
|
||||
using ICD.Common.Properties;
|
||||
using ICD.Common.Utils.IO;
|
||||
|
||||
namespace ICD.Common.Utils.Extensions
|
||||
{
|
||||
public static class AssemblyExtensions
|
||||
{
|
||||
public static class AssemblyExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the path for the given assembly. Returns null if the assembly can not be found on disk.
|
||||
/// </summary>
|
||||
@@ -43,5 +43,5 @@ namespace ICD.Common.Utils.Extensions
|
||||
|
||||
return IcdFile.Exists(path) ? path : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
#else
|
||||
using System.Reflection;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ICD.Common.Utils.Extensions
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace ICD.Common.Utils.Json
|
||||
/// <param name="writer">The <see cref="T:Newtonsoft.Json.JsonWriter"/> to write to.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <param name="serializer">The calling serializer.</param>
|
||||
public sealed override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
public override sealed void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ namespace ICD.Common.Utils.Json
|
||||
/// <returns>
|
||||
/// The object value.
|
||||
/// </returns>
|
||||
public sealed override object ReadJson(JsonReader reader, Type objectType, object existingValue,
|
||||
public override sealed object ReadJson(JsonReader reader, Type objectType, object existingValue,
|
||||
JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType == JsonToken.Null)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ICD.Common.Properties;
|
||||
using ICD.Common.Utils.Extensions;
|
||||
|
||||
@@ -189,4 +189,5 @@ namespace ICD.Common.Utils
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -125,4 +125,5 @@ namespace ICD.Common.Utils
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using ICD.Common.Properties;
|
||||
using ICD.Common.Services;
|
||||
using ICD.Common.Services.Logging;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp;
|
||||
#else
|
||||
using System.Threading.Tasks;
|
||||
#endif
|
||||
using ICD.Common.Properties;
|
||||
using ICD.Common.Services;
|
||||
using ICD.Common.Services.Logging;
|
||||
|
||||
namespace ICD.Common.Utils
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Text;
|
||||
using ICD.Common.Utils.IO;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.CrestronXml;
|
||||
|
||||
#else
|
||||
using System.Xml;
|
||||
#endif
|
||||
@@ -122,9 +123,9 @@ namespace ICD.Common.Utils.Xml
|
||||
m_Writer.WriteRaw(xml);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
#region Private Methods
|
||||
|
||||
#if STANDARD
|
||||
private static XmlWriterSettings GetSettings(Encoding encoding)
|
||||
|
||||
Reference in New Issue
Block a user