Skip to content

Conversation

@wenkepaul
Copy link

@wenkepaul wenkepaul commented Apr 23, 2024

I'm working on a project which doesn't use IServiceCollection or C# 9, but would benefit from using this library. In order to do so, I need to be able to set the FeatureFilters property without using init. This PR addsEnumerable<IFeatureFilterMetadata> and IEnumerable<ISessionManager> as optional parameters to the FeatureManager constructor and uses their existing Enumerable.Empty as a fallback.

@wenkepaul
Copy link
Author

@microsoft-github-policy-service agree

@jimmyca15
Copy link
Member

@wenkepaul can you open up an issue so the problem can be discussed?

@wenkepaul
Copy link
Author

@jimmyca15 issue 435 has been opened.

@zhiyuanliang-ms
Copy link
Member

/AzurePipeline run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zhiyuanliang-ms
Copy link
Member

I need to be able to set the FeatureFilters property without using init.

Do you mean the IsExternalInit pattern will not resolve the init accessor issue for .NET Framework?
https://github.com/microsoft/FeatureManagement-Dotnet/blob/main/src/Microsoft.FeatureManagement/IsExternalInit.cs

@alexaka1
Copy link

@zhiyuanliang-ms For me in a 4.7.2 project that doesn't use the SDK style project, the IsExternalInit does not solve the build error.

@jimmyca15
Copy link
Member

@zhiyuanliang-ms was this superseded by #450 ?

@zhiyuanliang-ms
Copy link
Member

@zhiyuanliang-ms was this superseded by #450 ?

@jimmyca15 I think, yes.

@wenkepaul I will close this PR. If you think the current solution still cannot meet your need, feel free to open an issue to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants