-
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 all commits
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
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
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 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Runtime.Versioning; | ||
|
||
namespace ComServerHelpers; | ||
|
||
/// <summary> | ||
/// Base for a WinRT Activation Factory for a .NET type. | ||
/// </summary> | ||
[SupportedOSPlatform("windows8.0")] | ||
public abstract class BaseActivationFactory | ||
beervoley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
/// <inheritdoc/> | ||
public abstract object ActivateInstance(); | ||
|
||
/// <summary> | ||
/// Gets the Activatable Class ID. | ||
/// </summary> | ||
public abstract string ActivatableClassId { get; } | ||
|
||
/// <summary> | ||
/// Occurs when a new instance is created. | ||
/// </summary> | ||
public event EventHandler<InstanceCreatedEventArgs>? InstanceCreated; | ||
beervoley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/// <summary> | ||
/// Raises the <see cref="InstanceCreated"/> event. | ||
/// </summary> | ||
/// <param name="instance">The created instance.</param> | ||
/// <event cref="InstanceCreated"/> | ||
internal void OnInstanceCreated(object instance) | ||
{ | ||
InstanceCreated?.Invoke(this, new InstanceCreatedEventArgs(instance)); | ||
} | ||
} |
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,55 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Runtime.Versioning; | ||
|
||
namespace ComServerHelpers; | ||
|
||
/// <summary> | ||
/// Base for a COM class factory for a .NET type. | ||
/// </summary> | ||
/// <remarks>Does not support aggregation. Will always return <c>CLASS_E_NOAGGREGATION</c> if requested.</remarks> | ||
[SupportedOSPlatform("windows6.0.6000")] | ||
public abstract class BaseClassFactory | ||
{ | ||
// Properties (special values) | ||
/// <summary> | ||
/// Gets the <c>CLSID</c>. | ||
/// </summary> | ||
protected internal abstract Guid Clsid | ||
{ | ||
get; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the <c>IID</c>. | ||
/// </summary> | ||
protected internal abstract Guid Iid | ||
{ | ||
get; | ||
} | ||
|
||
// Events | ||
/// <summary> | ||
/// Occurs when a new instance is created. | ||
/// </summary> | ||
public event EventHandler<InstanceCreatedEventArgs>? InstanceCreated; | ||
|
||
// Other members (methods) | ||
/// <summary> | ||
/// Creates an instance of the object. | ||
/// </summary> | ||
/// <returns>An instance of the object.</returns> | ||
protected internal abstract object CreateInstance(); | ||
|
||
/// <summary> | ||
/// Raises the <see cref="InstanceCreated"/> event. | ||
/// </summary> | ||
/// <param name="instance">The created instance.</param> | ||
/// <event cref="InstanceCreated"/> | ||
internal void OnInstanceCreated(object instance) | ||
{ | ||
InstanceCreated?.Invoke(this, new InstanceCreatedEventArgs(instance)); | ||
} | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really think about what actual namespace names to use. And type names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your suggestion?