Table of Contents

Class DetectorResultObject

Namespace
VirtualLabAPI.Core.LightPath
Assembly
VirtualLabAPI.dll

Class representing a the result of a detector. The result can be either a list of physical values or a single physical value, a VirtualLab document type, or a special object combining field data and view properties (ComplexAmplitudeView or HarmonicFieldsSetView).

[Serializable]
public class DetectorResultObject : ManualSerialization, IEquatable<IObjectBase>, ISerializable, IDeserializationCallback, IDisposable, ICloneable
Inheritance
ObjectBase
SerializableObjectBase
ManualSerialization
DetectorResultObject
Implements
IEquatable<IObjectBase>
Inherited Members

Constructors

DetectorResultObject(List<PhysicalValueBase>, string)

Constructor if the detector returns a list of PhysicalValueBase objects.

public DetectorResultObject(List<PhysicalValueBase> data, string description)

Parameters

data List<PhysicalValueBase>

The result data of the detector.

description string

The description of the detector.

DetectorResultObject(List<PhysicalValue>, string)

Constructor if the detector returns a list of PhysicalValue objects.

public DetectorResultObject(List<PhysicalValue> data, string description)

Parameters

data List<PhysicalValue>

The result data of the detector.

description string

The description of the detector.

DetectorResultObject(IDocument, string, string)

Constructor if the detector returns an IDocument object (for example a DataArrayBase).

public DetectorResultObject(IDocument data, string detectorName, string subDetector = "")

Parameters

data IDocument

The result data of the detector.

detectorName string

The name of the detector to which this result belongs.

subDetector string

Optional name of the sub-detector to which this result belongs.

Exceptions

ArgumentException

The given document is not serializable.

Properties

CompleteTitle

Gets the complete title (description [= detector name] + sub-detector.

public string CompleteTitle { get; }

Property Value

string

Only the Description if SubDetector is empty or null, "{SubDetector} – {Description}" otherwise.

Data

Gets the result data of the detector.

public object Data { get; }

Property Value

object

Description

Gets and sets the name of the detector to which this result belongs.

public string Description { get; set; }

Property Value

string

SubDetector

Gets and sets the name of the sub-detector to which this result belongs.

public string SubDetector { get; set; }

Property Value

string

Type

Gets the type of the result data.

public Type Type { get; }

Property Value

Type

Methods

Clone()

Creates a new object that is a copy of the current instance.

public override object Clone()

Returns

object

A new object that is a copy of this instance.

Equals(object?, EqualityIntent)

Determines whether the specified object is equal to this instance.

public override bool Equals(object? otherObject, EqualityIntent equalityIntent)

Parameters

otherObject object

The object to compare with this instance.

equalityIntent EqualityIntent

Defines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetDataAsDocument()

Gets the data as document.

public IDocument GetDataAsDocument()

Returns

IDocument

The data as document. null of the data is a list of physical values.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsCalculated()

Flag which determines whether results are already inserted to the DetectorResultObject.

public bool IsCalculated()

Returns

bool

TRUE: Results have already been added.

Show(DetectingDeviceBaseOSE, SnippetWithSourceCode?, string, LightPathLog?)

Shows the specified generating detecting device. Shows a reference.

public void Show(DetectingDeviceBaseOSE generatingDetectingDevice, SnippetWithSourceCode? snippet = null, string caption = "", LightPathLog? logger = null)

Parameters

generatingDetectingDevice DetectingDeviceBaseOSE

The generating detecting device.

snippet SnippetWithSourceCode

Optional snippet that generated the result.

caption string

The caption of the resulting document window. if this optional parameter is not specified, "{subDetectorString} – {detectorString}" is used.

logger LightPathLog

Optional logger (for Classic Field Tracing).

Show(Lightpath, string, LightPathLog)

Shows the specified generating detecting device. Shows a reference.

public void Show(Lightpath parentSetup, string caption = "", LightPathLog logger = null)

Parameters

parentSetup Lightpath

The parent Optical containing the detector (and maybe detector add-on) which generated the result.

caption string

The caption of the resulting document window. if this optional parameter is not specified, "{subDetectorString} – {detectorString}" is used.

logger LightPathLog

Optional logger (for Classic Field Tracing).