Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Command Line] Fix to use calculated namespaces instead of only the default set #179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sharpmake/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ private static void Execute(Type type, object instance, string commandLine, stri
if (isStatic)
{
string executeCode = string.Format("{0}.{1}({2});", type.FullName.Replace("+", "."), methodInfo.Name, parameter.Args);
Action execute = Assembler.BuildDelegate<Action>(executeCode, type.Namespace, DefaultNamespaces.ToArray(), assemblies.ToArray());
Action execute = Assembler.BuildDelegate<Action>(executeCode, type.Namespace, namespacesSet.ToArray(), assemblies.ToArray());

execute();
}
else
{
string executeCode = string.Format("((global::{0})obj).{1}({2});", type.FullName.Replace("+", "."), methodInfo.Name, parameter.Args);
Action<object> execute = Assembler.BuildDelegate<Action<object>>(executeCode, type.Namespace, DefaultNamespaces.ToArray(), assemblies.ToArray());
Action<object> execute = Assembler.BuildDelegate<Action<object>>(executeCode, type.Namespace, namespacesSet.ToArray(), assemblies.ToArray());

execute(instance);
}
Expand Down