Ejemplo n.º 1
0
 /// <summary>
 /// This method get INode from deSerialized class hierarchy by fullName. 
 /// If the name is not found, it will found alias for aliasLanguage. If alias is found,
 /// it will use the alias to do look up again. 
 /// </summary>
 /// <param name="fullName"></param>
 /// <param name="aliasLanguage"></param>
 /// <returns></returns>
 public INode GetNode(string fullName, string aliasLanguage)
 {
     INode ret = null;
     _lookupTable.TryGetValue(fullName, out ret);
     if (ret == null)
     {
         IDictionary<string, string> mapping = null;
         string assemblyName = null;
         _aliasLookupTable.TryGetValue(aliasLanguage, out mapping);
         if (mapping != null)
         {
             mapping.TryGetValue(fullName, out assemblyName);
             if (assemblyName != null)
             {
                 _lookupTable.TryGetValue(assemblyName, out ret);
             }
         }
         if (mapping == null || assemblyName == null || ret == null)
         {
             var ex = new NameResolutionException(fullName, "Cannot resolve the name from the class hierarchy during de-serialization: " + fullName);
             Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER);
         }
     }
     return ret;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Get a Node from the class hierarchy 
 /// </summary>
 /// <param name="fullName"></param>
 /// <returns></returns>
 public INode GetNode(string fullName)
 {
     INode ret;
     _lookupTable.TryGetValue(fullName, out ret);
     if (ret == null)
     {
         var ex = new NameResolutionException(fullName, "Cannot resolve the name from the class hierarchy during deserialization: " + fullName);
         Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER);
     }
     return ret;
 }