Opalis Quick Integration Kit
3.0
Assembly: Opalis.QuickIntegrationKit(in Opalis.QuickIntegrationKit.dll) Version: 3.0.0.0 (3.1.0.1)
Marks a class that can be used to encapsulate
filter, input and output properties for an OpalisObject
class.
Namespace:
Opalis.QuickIntegrationKit
Assembly: Opalis.QuickIntegrationKit(in Opalis.QuickIntegrationKit.dll) Version: 3.0.0.0 (3.1.0.1)
Syntax
Remarks
There are two common uses of the OpalisData attribute:
- To support configuration options by encapsulating one or more OpalisInputAttributeproperties in a class that can be injected into an OpalisObject through a property marked with the OpalisConfigurationAttribute.
- To support correlated published data by encapsulating two or more OpalisOutputAttributeproperties in a class that is published either through the IOpalisResponseinterface or through an property marked with OpalisOutputAttribute.
Examples
The following examples illustrates how to use the
OpalisDataAttribute to publish outputs whose properties should be
correllated.
CopyC#
[OpalisData] public class FileInfoAdapter { private readonly FileInfo fileInfo; public FileInfoAdapter(FileInfo fileInfo) { this.fileInfo = fileInfo; } [OpalisOutput, OpalisFilter] public string Name { get { return fileInfo.Name; } } [OpalisOutput, OpalisFilter] public int Length { get { return fileInfo.Length; } } [OpalisOutput, OpalisFilter] public DateTime CreationTime { get { return fileInfo.CreationTime; } } [OpalisOutput, OpalisFilter] public DateTime LastWriteTime { get { return fileInfo.LastWriteTime; } } [OpalisOutput, OpalisFilter] public bool ReadOnly { get { return (fileInfo.Attributes & FileAttributes.ReadOnly) != 0; } } } [OpalisObject] public class GetDirectory { public DirectoryInfo path; [OpalisInput] public DirectoryInfo Path { set{ path = value; } } [OpalisOutput] public IEnumerable<FileInfoWrapper> Files { foreach(FileInfo info in path.GetFiles( "*.*")) { yield return new FileInfoAdapter(info); } } }
Inheritance Hierarchy
System
.
.
::
.
Object
System . . :: . Attribute
Opalis.QuickIntegrationKit . . :: . OpalisDataAttribute
System . . :: . Attribute
Opalis.QuickIntegrationKit . . :: . OpalisDataAttribute