/// <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); }
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); Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER); } return(ret); }