-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ResXFileRef from this project. Fixes #5
Test we can read file refs that we write. Also move type data string to ResXConstants Demonstate writing winforms assembly for internal ResXFileRef Move winforms type conversion to library internals Test user-provided type converters don't break winforms overwrites Fix NullReferenceException on non-Windows platforms. Use an ordinal comparison for type names. Fix tests. Switch back to C# 7.3. Use a StringWriter instead of a temp file. Remove local fix for tests that breaks the build.
- Loading branch information
1 parent
84243d1
commit f5caaa9
Showing
11 changed files
with
541 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace System.Resources.NetStandard | ||
{ | ||
internal static class WinformsTypeMappers | ||
{ | ||
public static Func<Type, string> InterceptWinformsTypes(Func<Type,string> typeNameConverter) | ||
{ | ||
return (Type type) => | ||
{ | ||
if (type.AssemblyQualifiedName == typeof(ResXFileRef).AssemblyQualifiedName) | ||
{ | ||
return NetStandard.ResXConstants.ResxFileRefTypeInfo; | ||
} | ||
else | ||
{ | ||
if (typeNameConverter != null) return typeNameConverter(type); | ||
else return null; | ||
} | ||
}; | ||
} | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.