Opalis Quick Integration Kit
3.0
Assembly: Opalis.QuickIntegrationKit(in Opalis.QuickIntegrationKit.dll) Version: 3.0.0.0 (3.1.0.1)
Publishes an OpalisData object as correlated
data set.
Namespace:
Opalis.QuickIntegrationKit
Assembly: Opalis.QuickIntegrationKit(in Opalis.QuickIntegrationKit.dll) Version: 3.0.0.0 (3.1.0.1)
Syntax
C# |
---|
void Publish( Object data ) |
Visual Basic (Declaration) |
---|
Sub Publish ( _ data As Object _ ) |
Visual C++ |
---|
void Publish( Object^ data ) |
Parameters
- data
- Type:
System
.
.
::
.
Object
One or more OpalisData objects to be published
Return Value
The number of objects that were actually published.Remarks
The method will only publish objects that are marked with
OpalisDataAttribute.
Remarks
Assumes that the type of the value being published is
marked with the OpalisData attribute.
Examples
CopyC#
[OpalisData] public class ServiceInfo { private readonly ManagementObject service; internal ServiceInfo(ManagementObject service) { this.service = service; } [OpalisOutput] public object Name { get { return service[ "Name"]; } } [OpalisOutput] public object Status { get { return service[ "Status"]; } } [OpalisOutput( "Display Name")] public object DisplayName{ get { return service[ "DisplayName"]; } } } [OpalisObject( "Get Service Info")] public class GetServices : IOpalisObject { public void Design(IOpalisDesigner designer) { designer.AddCorellatedData( typeof(ServiceInfo)); } public void Execute(IOpalisRequest request, IOpalisResponse response) { SelectQuery query = new SelectQuery( "Win32_Service"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); foreach (ManagementObject service in searcher.Get()) { response.Publish( new ServiceInfo(service)); } } }