I have an implementation of the Shunting-Yard algorithm that I am trying to integrate clearly into our framework. Currently I have it all packed into a class with a simple public interface.
namespace MathematicalParser {
public class ExpressionParser {
public ExpressionParser(string expression, List<string> variables);
public double GetNumericValue(Dictionary<string,double> variableValues);
}
}
Inside this class there are a lot of helper classes, helper enums, static variables etc to map different names to functions. All these are private so that is no concern to the user of the library.
In an effort to improve maintainability of the code I'm trying to separate code that is logically unrelated into their own classes, these classes do however not have any meaning outside of the ExpressionParser so I'd like to limit their visibility to the namespace MathematicalParser (which only contains the ExpressionParser).
How do you best accomplish this in c#, the internal keyword only works on assemblies and private can't be used in namespaces.