Example #1
0
        private static Type DeserializeType(TypeData typeData) =>
        s_typeCache.GetOrAdd(
            typeData,
            td =>
        {
            Type type = AssemblyLoader.LoadAssembly(
                td.AssemblyName,
                td.AssemblyFileName)?.GetType(td.Name, true);
            if (type == null)
            {
                throw new FileNotFoundException(
                    string.Format(
                        "Assembly '{0}' file not found '{1}'",
                        td.AssemblyName,
                        td.AssemblyFileName));
            }

            return(type);
        });
Example #2
0
 private static Type DeserializeType(TypeData typeData) =>
 s_typeCache.GetOrAdd(
     typeData,
     td => AssemblyLoader.LoadAssembly(
         td.AssemblyName,
         td.AssemblyFileName).GetType(td.Name));