-
-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the Bug
If I try to embed something like swaggerui.js and swaggerui.css in the same assembly, it will try to put them both in under the same parent class.
Steps to Reproduce
Embed swaggerui.js and swaggerui.css in the same assembly, which generates this
..snip
/// <summary>
/// => @"swaggerui/swaggerui.css"
/// </summary>
public static partial class swaggerui
{
public static byte[] GetBytes() => EmbeddedResource.GetBytes(@"swaggerui/swaggerui.css");
public static Stream GetStream() => EmbeddedResource.GetStream(@"swaggerui/swaggerui.css");
}
}And this:
...snip
public static partial class swaggerui
{
/// <summary>
/// => @"swaggerui/swaggerui.js"
/// </summary>
public static partial class swaggerui
{
public static byte[] GetBytes() => EmbeddedResource.GetBytes(@"swaggerui/swaggerui.js");
public static Stream GetStream() => EmbeddedResource.GetStream(@"swaggerui/swaggerui.js");
}
}...in the same namespace, which creates naming collisions
Expected Behavior
Perhaps make the class creation go all the way down to the extension like so:?
...snip
public static partial class swaggerui
{
/// <summary>
/// => @"swaggerui/swaggerui.css"
/// </summary>
public static partial class swaggerui
{
public static partial class css
{
public static byte[] GetBytes() => EmbeddedResource.GetBytes(@"swaggerui/swaggerui.js");
public static Stream GetStream() => EmbeddedResource.GetStream(@"swaggerui/swaggerui.js");
}
...snip
/// <summary>
/// => @"swaggerui/swaggerui.css"
/// </summary>
public static partial class js
{
public static byte[] GetBytes() => EmbeddedResource.GetBytes(@"swaggerui/swaggerui.js");
public static Stream GetStream() => EmbeddedResource.GetStream(@"swaggerui/swaggerui.js");
}
}
}Exception with Stack Trace
swaggerui.swaggerui.js.g.cs(26,38): error CS0111: Type 'ThisAssembly.Resources.swaggerui.swaggerui' already defines a member called 'GetStream' with the same parameter types
Version Info
1.1.1
Additional Info
None
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working