|
@@ -13,8 +13,8 @@ namespace Quadarax.Foundation.Core.Reflection
|
|
|
// ReSharper disable MemberCanBePrivate.Global
|
|
// ReSharper disable MemberCanBePrivate.Global
|
|
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
|
|
public string Name { get; private set; }
|
|
public string Name { get; private set; }
|
|
|
- public string Assembly { get; private set; }
|
|
|
|
|
- public string Culture { get; private set; }
|
|
|
|
|
|
|
+ public string? Assembly { get; private set; }
|
|
|
|
|
+ public string? Culture { get; private set; }
|
|
|
public string Token { get; private set; }
|
|
public string Token { get; private set; }
|
|
|
public string Version { get; private set; }
|
|
public string Version { get; private set; }
|
|
|
public string AssemblyFullName { get; private set; }
|
|
public string AssemblyFullName { get; private set; }
|
|
@@ -24,6 +24,10 @@ namespace Quadarax.Foundation.Core.Reflection
|
|
|
#region *** Constructors ***
|
|
#region *** Constructors ***
|
|
|
public QualifiedName(string sReflectionQualifiedName)
|
|
public QualifiedName(string sReflectionQualifiedName)
|
|
|
{
|
|
{
|
|
|
|
|
+ Name = string.Empty;
|
|
|
|
|
+ Token = string.Empty;
|
|
|
|
|
+ Version = string.Empty;
|
|
|
|
|
+ AssemblyFullName = string.Empty;
|
|
|
var aParts = sReflectionQualifiedName.Split(CC_SEPARATOR)
|
|
var aParts = sReflectionQualifiedName.Split(CC_SEPARATOR)
|
|
|
.Select(x => x.Trim())
|
|
.Select(x => x.Trim())
|
|
|
.ToList();
|
|
.ToList();
|
|
@@ -101,8 +105,11 @@ namespace Quadarax.Foundation.Core.Reflection
|
|
|
}
|
|
}
|
|
|
#endregion
|
|
#endregion
|
|
|
#region *** Private Operations ***
|
|
#region *** Private Operations ***
|
|
|
- private void SetupProperties(AssemblyName oName)
|
|
|
|
|
|
|
+ private void SetupProperties(AssemblyName? oName)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (oName == null)
|
|
|
|
|
+ throw new ArgumentNullException(nameof(oName));
|
|
|
|
|
+
|
|
|
Assembly = oName.Name;
|
|
Assembly = oName.Name;
|
|
|
AssemblyFullName = oName.FullName;
|
|
AssemblyFullName = oName.FullName;
|
|
|
Culture = oName.CultureName;
|
|
Culture = oName.CultureName;
|
|
@@ -112,7 +119,7 @@ namespace Quadarax.Foundation.Core.Reflection
|
|
|
}
|
|
}
|
|
|
private void ThrowCannotParse(string sReflectionQualifiedName, System.Exception oInnerException)
|
|
private void ThrowCannotParse(string sReflectionQualifiedName, System.Exception oInnerException)
|
|
|
{
|
|
{
|
|
|
- throw new ArgumentException(string.Format("Cannot parse QualifiedName '{0}'!", sReflectionQualifiedName), oInnerException);
|
|
|
|
|
|
|
+ throw new ArgumentException($"Cannot parse QualifiedName '{sReflectionQualifiedName}'!", oInnerException);
|
|
|
}
|
|
}
|
|
|
#endregion
|
|
#endregion
|
|
|
}
|
|
}
|