Skip to content

Commit

Permalink
Improved XML docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuelie committed Aug 30, 2024
1 parent 328d505 commit 860e622
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Shmuelie.WinRTServer/ComServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ namespace Shmuelie.WinRTServer;
/// <summary>
/// An Out of Process COM Server.
/// </summary>
/// <remarks>
/// <para>Allows for types to be created using COM activation instead of WinRT activation like <see cref="WinRtServer"/>.</para>
/// <para>Typical usage is to call from an <see langword="await"/> <see langword="using"/> block, using <see cref="WaitForFirstObjectAsync"/> to not close until it is safe to do so.</para>
/// <code language="cs">
/// <![CDATA[
/// await using (ComServer server = new ComServer())
/// {
/// server.RegisterClass<RemoteThing, IRemoteThing>();
/// server.Start();
/// await server.WaitForFirstObjectAsync();
/// }
/// ]]>
/// </code>
/// </remarks>
/// <see cref="IAsyncDisposable"/>
/// <threadsafety static="true" instance="false"/>
[SupportedOSPlatform("windows6.0.6000")]
Expand Down Expand Up @@ -197,6 +211,7 @@ private void Factory_InstanceCreated(object? sender, InstanceCreatedEventArgs e)
/// <summary>
/// Starts the server.
/// </summary>
/// <remarks>Calling <see cref="Start"/> is non-blocking.</remarks>
/// <exception cref="ObjectDisposedException">The instance is disposed.</exception>
public void Start()
{
Expand Down
18 changes: 18 additions & 0 deletions src/Shmuelie.WinRTServer/WinRtServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,28 @@ namespace Shmuelie.WinRTServer;
/// <summary>
/// An Out of Process Windows Runtime Server.
/// </summary>
/// <remarks>
/// <para>Allows for types to be created using WinRT activation instead of COM activation like <see cref="ComServer"/>.</para>
/// <para>Typical usage is to call from an <see langword="await"/> <see langword="using"/> block, using <see cref="WaitForFirstObjectAsync"/> to not close until it is safe to do so.</para>
/// <code language="cs">
/// <![CDATA[
/// await using (WinRtServer server = new WinRtServer())
/// {
/// server.RegisterClass<RemoteThing>();
/// server.Start();
/// await server.WaitForFirstObjectAsync();
/// }
/// ]]>
/// </code>
/// </remarks>
/// <see cref="IAsyncDisposable"/>
/// <threadsafety static="true" instance="false"/>
[SupportedOSPlatform("windows8.0")]
public sealed class WinRtServer : IAsyncDisposable
{
/// <summary>
/// Mapping of Activatable Class IDs to activation factories and their <see cref="ComWrappers"/> implementation.
/// </summary>
private readonly Dictionary<string, (BaseActivationFactory Factory, ComWrappers Wrapper)> factories = [];

private readonly unsafe DllGetActivationFactory activationFactoryCallbackWrapper;
Expand Down Expand Up @@ -217,6 +234,7 @@ public bool IsDisposed
/// <summary>
/// Starts the server.
/// </summary>
/// <remarks>Calling <see cref="Start"/> is non-blocking.</remarks>
public unsafe void Start()
{
if (IsDisposed)
Expand Down

0 comments on commit 860e622

Please sign in to comment.