-
Notifications
You must be signed in to change notification settings - Fork 115
Integrate Shmueli's ComServer into CsWinRT #1995
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
790ad43
add comservehelpers
beervoley bcd145b
add copyright notices
beervoley 59c5a86
fix tests
beervoley 121a51a
copy comservers binaries to output location
beervoley 5646caf
update nuget pack to include com server helpers
beervoley b9f748e
address PR feedback
beervoley 8f4db4f
version assembly separately
beervoley eca2d2b
add oop com tests
beervoley b7f28e4
update tests
beervoley 2ac6e85
clean up
beervoley e084530
clean up
beervoley 6fc66f2
remove trustlevel marshaller - unsused
beervoley 2d043ca
invalid arg to invalid ptr
beervoley bd37f88
remove roinitialize; replace malloc
beervoley 168290d
global option is not iinspectable; do direct cast
beervoley 08c16c4
address PR feedback
beervoley 0202908
reorder fields to match guidelines
beervoley 5ab887a
add missing file
beervoley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,37 @@ | ||
#if NET8_0_OR_GREATER | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Reflection; | ||
using System.Threading; | ||
using ComServerHelpers; | ||
using ComServerHelpers.CsWinRT; | ||
using Windows.Foundation; | ||
using Xunit; | ||
|
||
namespace UnitTest | ||
{ | ||
public class ComServerHelperTests | ||
{ | ||
|
||
[Fact] | ||
public void TestCOMRegistrationAndActivation() | ||
{ | ||
ComServer server = new ComServer(); | ||
OOPAsyncAction obj = new OOPAsyncAction(); | ||
server.RegisterClass<OOPAsyncAction, IAsyncAction>(() => { return obj; }); | ||
server.Start(); | ||
|
||
var currentExecutingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | ||
var launchExePath = $"{currentExecutingDir}\\OOPExe.exe"; | ||
var proc = Process.Start(launchExePath); | ||
|
||
Thread.Sleep(5000); | ||
obj.Close(); | ||
Assert.True(obj.delegateCalled); | ||
server.Dispose(); | ||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.