Beispiel #1
0
 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));
 }
Beispiel #2
0
        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));
            }
        }