Wrapper around a COM object that allows 'dynamic' like behavior to work in .NET Core where dynamic with COM objects is not working. This
Credit to: https://github.com/bubibubi/EntityFrameworkCore.Jet/blob/3.1-preview/src/System.Data.Jet/ComObject.cs Added here with slight interface modifications
System.Dynamic.DynamicObject
Westwind.Utilities.ComObject
public class ComObject : DynamicObject, IDisposable
Class Members
Member | Description | |
---|---|---|
Constructor |
Pass a COM Object reference to create this COM Object wrapper | |
CreateFirstFrom |
Create a new instance based on ClassId public static ComObject CreateFirstFrom(Guid clsid) |
|
CreateFromProgId |
Create a new instance based on ProgId public static ComObject CreateFromProgId(string progid) |
|
Detach |
Removes the COM reference linkage from this object public object Detach() |
|
Dispose |
public sealed void Dispose() |
|
TryGetIndex |
public virtual bool TryGetIndex(GetIndexBinder binder, Object[] indexes, ref object result) |
|
TryGetMember |
public virtual bool TryGetMember(GetMemberBinder binder, ref object result) |
|
TryInvokeMember |
public virtual bool TryInvokeMember(InvokeMemberBinder binder, Object[] args, ref object result) |
|
TrySetMember |
public virtual bool TrySetMember(SetMemberBinder binder, object value) |
Requirements
Namespace: Westwind.UtilitiesAssembly: westwind.utilities.dll
© West Wind Technologies, 1996-2024 • Updated: 06/29/24
Comment or report problem with topic