You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the story, please be clear on scope of the story.
At present, nearly all classes and interfaces in the .NET Agent are declared as public. In general this isn't a problem, but there have been reports of some customers running to issues in their use of certain dependency injection frameworks and other assembly scanning tools that look for all publicly accessible classes and interfaces in all assemblies loaded into the current application domain.
We should try, to the extent possible, to refactor the .NET Agent to convert all public classes and interfaces that aren't part of our intended public API to internal instead. In general, the only public classes should be those we intentionally expose for clients to use - i.e., the classes in NewRelic.Api.Agent.
Potential issues with a refactor would include impacts on Unit and Integration Tests that need access to classes in the Agent that are currently public. Possible solutions to that issue would be to use the InternalsVisibleTo attribute to allow our test classes access to the internals, or to refactor the code so that concrete classes remain internal while only interfaces would be public and refactor tests to reference interfaces instead of concrete classes.
This work should probably be preceded by a spike to determine the extent of the effort involved and assess the risks of refactoring.
Acceptance Criteria
The Agent should continue to function as it always has, and clients who scan all assemblies for public classes should not experience any errors.
Estimates
Please provide initial t-shirt size
L
The text was updated successfully, but these errors were encountered:
Describe the story, please be clear on scope of the story.
At present, nearly all classes and interfaces in the .NET Agent are declared as
public
. In general this isn't a problem, but there have been reports of some customers running to issues in their use of certain dependency injection frameworks and other assembly scanning tools that look for all publicly accessible classes and interfaces in all assemblies loaded into the current application domain.We should try, to the extent possible, to refactor the .NET Agent to convert all
public
classes and interfaces that aren't part of our intended public API tointernal
instead. In general, the onlypublic
classes should be those we intentionally expose for clients to use - i.e., the classes inNewRelic.Api.Agent
.Potential issues with a refactor would include impacts on Unit and Integration Tests that need access to classes in the Agent that are currently
public
. Possible solutions to that issue would be to use theInternalsVisibleTo
attribute to allow our test classes access to the internals, or to refactor the code so that concrete classes remaininternal
while only interfaces would bepublic
and refactor tests to reference interfaces instead of concrete classes.This work should probably be preceded by a spike to determine the extent of the effort involved and assess the risks of refactoring.
Acceptance Criteria
The Agent should continue to function as it always has, and clients who scan all assemblies for public classes should not experience any errors.
Estimates
Please provide initial t-shirt size
L
The text was updated successfully, but these errors were encountered: