-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This won't work, but I'm committing this becaus I finally got it to c…
…ompile a String[]
- Loading branch information
1 parent
5a9cdc8
commit 36539cf
Showing
11 changed files
with
217 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "pch.h" | ||
|
||
#include "CommandlineArgs.h" | ||
#include "CommandlineArgs.g.cpp" | ||
using namespace winrt; | ||
using namespace winrt::Microsoft::Terminal; | ||
using namespace winrt::Windows::Foundation; | ||
|
||
namespace winrt::Microsoft::Terminal::Remoting::implementation | ||
{ | ||
void CommandlineArgs::Args(winrt::array_view<const winrt::hstring> const& value) | ||
{ | ||
_args = { value.begin(), value.end() }; | ||
} | ||
|
||
winrt::com_array<winrt::hstring> CommandlineArgs::Args() | ||
{ | ||
return winrt::com_array<winrt::hstring>{ _args.begin(), _args.end() }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
|
||
#include "CommandlineArgs.g.h" | ||
#include "../cascadia/inc/cppwinrt_utils.h" | ||
|
||
namespace winrt::Microsoft::Terminal::Remoting::implementation | ||
{ | ||
struct CommandlineArgs : public CommandlineArgsT<CommandlineArgs> | ||
{ | ||
public: | ||
CommandlineArgs() : | ||
_args{}, | ||
_cwd{ L"" } | ||
{ | ||
} | ||
|
||
CommandlineArgs(const winrt::array_view<const winrt::hstring>& args, | ||
winrt::hstring currentDirectory) : | ||
_args{ args.begin(), args.end() }, | ||
_cwd{ currentDirectory } | ||
{ | ||
} | ||
|
||
winrt::hstring CurrentDirectory() { return _cwd; }; | ||
|
||
void Args(winrt::array_view<const winrt::hstring> const& value); | ||
winrt::com_array<winrt::hstring> Args(); | ||
|
||
private: | ||
winrt::com_array<winrt::hstring> _args; | ||
winrt::hstring _cwd; | ||
}; | ||
|
||
} | ||
|
||
namespace winrt::Microsoft::Terminal::Remoting::factory_implementation | ||
{ | ||
BASIC_FACTORY(CommandlineArgs); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.