private static void ThrowCannotResolveImport(ImportedValue Import, string ImportType) { throw new WasmException( string.Format( "Importer cannot resolve {0} definition '{1}.{2}'.", ImportType, Import.ModuleName, Import.FieldName)); }
private static T ImportOrDefault <T>(ImportedValue Value, Dictionary <string, T> Definitions) { T result; if (Definitions.TryGetValue(Value.FieldName, out result)) { return(result); } else { return(default(T)); } }