Add XML documentation across gateway, worker, and .NET client
This commit is contained in:
@@ -28,10 +28,14 @@ public sealed class MxAccessSession : IDisposable
|
||||
CreationThreadId = creationThreadId;
|
||||
}
|
||||
|
||||
/// <summary>The thread ID where this session was created.</summary>
|
||||
public int CreationThreadId { get; }
|
||||
|
||||
/// <summary>The registry for tracking opened handles.</summary>
|
||||
public MxAccessHandleRegistry HandleRegistry => handleRegistry;
|
||||
|
||||
/// <summary>Creates a WorkerReady message with session metadata.</summary>
|
||||
/// <param name="workerProcessId">Process ID of the worker.</param>
|
||||
public WorkerReady CreateWorkerReady(int workerProcessId)
|
||||
{
|
||||
return new WorkerReady
|
||||
@@ -43,6 +47,10 @@ public sealed class MxAccessSession : IDisposable
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Creates and initializes an MXAccess COM session.</summary>
|
||||
/// <param name="factory">Factory to create the MXAccess COM object.</param>
|
||||
/// <param name="eventSink">Event sink to attach to the COM object.</param>
|
||||
/// <param name="sessionId">Identifier of the session.</param>
|
||||
public static MxAccessSession Create(
|
||||
IMxAccessComObjectFactory factory,
|
||||
IMxAccessEventSink eventSink,
|
||||
@@ -97,6 +105,8 @@ public sealed class MxAccessSession : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Registers a client with MXAccess and returns the server handle.</summary>
|
||||
/// <param name="clientName">Name of the client to register.</param>
|
||||
public int Register(string clientName)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
@@ -107,6 +117,8 @@ public sealed class MxAccessSession : IDisposable
|
||||
return serverHandle;
|
||||
}
|
||||
|
||||
/// <summary>Unregisters a client from MXAccess.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
public void Unregister(int serverHandle)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
@@ -115,6 +127,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
handleRegistry.UnregisterServerHandle(serverHandle);
|
||||
}
|
||||
|
||||
/// <summary>Adds an item to an MXAccess server and returns the item handle.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemDefinition">Definition or address of the item to add.</param>
|
||||
public int AddItem(
|
||||
int serverHandle,
|
||||
string itemDefinition)
|
||||
@@ -132,6 +147,10 @@ public sealed class MxAccessSession : IDisposable
|
||||
return itemHandle;
|
||||
}
|
||||
|
||||
/// <summary>Adds an item with context to an MXAccess server and returns the item handle.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemDefinition">Definition or address of the item to add.</param>
|
||||
/// <param name="itemContext">Context string for the item.</param>
|
||||
public int AddItem2(
|
||||
int serverHandle,
|
||||
string itemDefinition,
|
||||
@@ -150,6 +169,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
return itemHandle;
|
||||
}
|
||||
|
||||
/// <summary>Removes an item from an MXAccess server.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandle">Handle returned by the worker.</param>
|
||||
public void RemoveItem(
|
||||
int serverHandle,
|
||||
int itemHandle)
|
||||
@@ -160,6 +182,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
handleRegistry.RemoveItemHandle(serverHandle, itemHandle);
|
||||
}
|
||||
|
||||
/// <summary>Advises on item changes with plain subscription.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandle">Handle returned by the worker.</param>
|
||||
public void Advise(
|
||||
int serverHandle,
|
||||
int itemHandle)
|
||||
@@ -173,6 +198,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
MxAccessAdviceKind.Plain);
|
||||
}
|
||||
|
||||
/// <summary>Removes plain advice subscription from an item.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandle">Handle returned by the worker.</param>
|
||||
public void UnAdvise(
|
||||
int serverHandle,
|
||||
int itemHandle)
|
||||
@@ -183,6 +211,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
handleRegistry.RemoveAdviceHandles(serverHandle, itemHandle);
|
||||
}
|
||||
|
||||
/// <summary>Advises on item changes with supervisory subscription.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandle">Handle returned by the worker.</param>
|
||||
public void AdviseSupervisory(
|
||||
int serverHandle,
|
||||
int itemHandle)
|
||||
@@ -196,6 +227,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
MxAccessAdviceKind.Supervisory);
|
||||
}
|
||||
|
||||
/// <summary>Adds multiple items in bulk, returning success/failure results.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="tagAddresses">Enumerable of item definitions to add.</param>
|
||||
public IReadOnlyList<SubscribeResult> AddItemBulk(
|
||||
int serverHandle,
|
||||
IEnumerable<string> tagAddresses)
|
||||
@@ -229,6 +263,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>Advises on multiple items in bulk, returning success/failure results.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandles">Enumerable of item handles to advise on.</param>
|
||||
public IReadOnlyList<SubscribeResult> AdviseItemBulk(
|
||||
int serverHandle,
|
||||
IEnumerable<int> itemHandles)
|
||||
@@ -256,6 +293,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>Removes multiple items in bulk, returning success/failure results.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandles">Enumerable of item handles to remove.</param>
|
||||
public IReadOnlyList<SubscribeResult> RemoveItemBulk(
|
||||
int serverHandle,
|
||||
IEnumerable<int> itemHandles)
|
||||
@@ -283,6 +323,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>Removes advice subscriptions from multiple items in bulk, returning success/failure results.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandles">Enumerable of item handles to unadvise.</param>
|
||||
public IReadOnlyList<SubscribeResult> UnAdviseItemBulk(
|
||||
int serverHandle,
|
||||
IEnumerable<int> itemHandles)
|
||||
@@ -310,6 +353,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>Adds multiple items and subscribes to them in bulk, returning success/failure results.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="tagAddresses">Enumerable of item definitions to add and subscribe to.</param>
|
||||
public IReadOnlyList<SubscribeResult> SubscribeBulk(
|
||||
int serverHandle,
|
||||
IEnumerable<string> tagAddresses)
|
||||
@@ -351,6 +397,9 @@ public sealed class MxAccessSession : IDisposable
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>Unsubscribes from multiple items in bulk, returning success/failure results.</summary>
|
||||
/// <param name="serverHandle">Handle returned by the worker.</param>
|
||||
/// <param name="itemHandles">Enumerable of item handles to unsubscribe from.</param>
|
||||
public IReadOnlyList<SubscribeResult> UnsubscribeBulk(
|
||||
int serverHandle,
|
||||
IEnumerable<int> itemHandles)
|
||||
@@ -392,6 +441,7 @@ public sealed class MxAccessSession : IDisposable
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>Gracefully shuts down the session, cleaning up all handles.</summary>
|
||||
public MxAccessShutdownResult ShutdownGracefully()
|
||||
{
|
||||
if (disposed)
|
||||
@@ -409,6 +459,7 @@ public sealed class MxAccessSession : IDisposable
|
||||
return new MxAccessShutdownResult(failures);
|
||||
}
|
||||
|
||||
/// <summary>Releases the MXAccess COM object and resources.</summary>
|
||||
public void Dispose()
|
||||
{
|
||||
if (disposed)
|
||||
|
||||
Reference in New Issue
Block a user