Merge pull request #830 from Blizzard/resource-generator-access
Resource generator access
This commit is contained in:
commit
5b8a3d26eb
@ -80,6 +80,25 @@
|
||||
end
|
||||
|
||||
|
||||
function suite.publicResourceDesignerDependency()
|
||||
files { "Resources.resx", "Resources.Designer.cs" }
|
||||
resourcegenerator 'public'
|
||||
|
||||
prepare()
|
||||
test.capture [[
|
||||
<Compile Include="Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
function suite.settingsDesignerDependency()
|
||||
files { "Properties/Settings.settings", "Properties/Settings.Designer.cs" }
|
||||
prepare()
|
||||
|
@ -1001,6 +1001,16 @@
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "resourcegenerator",
|
||||
scope = "project",
|
||||
kind = "string",
|
||||
allowed = {
|
||||
"internal",
|
||||
"public"
|
||||
}
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "rtti",
|
||||
scope = "config",
|
||||
|
@ -160,7 +160,15 @@
|
||||
testname = basename .. ".Designer.cs"
|
||||
if project.hasfile(fcfg.project, testname) then
|
||||
info.SubType = "Designer"
|
||||
info.Generator = "ResXFileCodeGenerator"
|
||||
|
||||
local resourceAccessGenerator = "ResXFileCodeGenerator"
|
||||
if fcfg.project.resourcegenerator then
|
||||
if fcfg.project.resourcegenerator == "public" then
|
||||
resourceAccessGenerator = "PublicResXFileCodeGenerator"
|
||||
end
|
||||
end
|
||||
|
||||
info.Generator = resourceAccessGenerator
|
||||
info.LastGenOutput = path.getname(testname)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user