Skip to content

Commit

Permalink
🐛 AttributeUsage.Class doesn't apply to interfaces :/
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffynuts committed Nov 12, 2024
1 parent 0ce4658 commit a529343
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,12 @@ public void ShouldReadAllDefaultsFromEnvironment()
.To.Equal(expectedString);
}

[AllowDefaultsFromEnvironment]
public interface IOptions
{
int Number { get; set; }
}

[AllowDefaultsFromEnvironment]
public class AllFromEnv
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ string environmentVariable
/// Allows defaults for all options on the options
/// object to be overridden from environment variables
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
#if BUILD_PEANUTBUTTER_EASYARGS_INTERNAL
internal
#else
Expand Down

0 comments on commit a529343

Please sign in to comment.