16 public static class AssemblyNameTranslator
18 private static string _coreLibAssembly =
null;
19 private static string CoreLibAssembly
23 if (_coreLibAssembly ==
null)
25 _coreLibAssembly = typeof(
object).AssemblyQualifiedName;
26 _coreLibAssembly = _coreLibAssembly.Substring(_coreLibAssembly.IndexOf(
", ") + 2);
28 return _coreLibAssembly;
31 private static string _cslaLibAssembly =
null;
32 private static string CslaLibAssembly
36 if (_cslaLibAssembly ==
null)
39 _cslaLibAssembly = _cslaLibAssembly.Substring(_cslaLibAssembly.IndexOf(
", ") + 2);
41 return _cslaLibAssembly;
45 private static readonly
string CORELIB =
"/n";
46 private static readonly
string CSLALIB =
"/c";
55 public static string GetAssemblyQualifiedName(Type type)
57 var result = type.AssemblyQualifiedName;
58 result = result.Replace(CoreLibAssembly, CORELIB);
59 result = result.Replace(CslaLibAssembly, CSLALIB);
70 public static string GetAssemblyQualifiedName(
string typeName)
72 var result = typeName;
73 result = result.Replace(CORELIB, CoreLibAssembly);
74 result = result.Replace(CSLALIB, CslaLibAssembly);
Placeholder for null child objects.