public IDataType GetType(string typeName) { Type foundType = null; if (typeName.EndsWith("]]")) { var regex = new Regex(@"^(?<collectionType>.+?)\[\[(?<paramterTypes>.+?)\]\]$"); var matches = regex.Matches(typeName); if (matches.Count == 1) { var parameters = matches[0].Groups["paramterTypes"].Value; var valueTypeName = matches[0].Groups["collectionType"].Value; var valueType = typeFinder.GetType(valueTypeName); if (valueType != null) { var paramterTypes = GetParamterTypes(parameters); foundType = valueType.GetTargetType().MakeGenericType(paramterTypes); } if (foundType != null) { typesCache.Add(typeName, foundType); } } } return(foundType == null ? null : dataTypeFactory.Create(foundType)); }
public IDataType GetType(string typeName) { var foundType = seedAssembly.GetType(typeName); if (foundType != null) { typesCache.Add(typeName, foundType); return(dataTypeFactory.Create(foundType)); } return(null); }
public IDataType GetType(string typeName) { var assemblyNameFilter = new PassOnceNameFilter(); var foundType = SearchReferencedAssemblies(typeName, seedAssembly, assemblyNameFilter); if (foundType != null) { typesCache.Add(typeName, foundType); } return(dataTypeFactory.Create(foundType)); }