2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Diagnostics.CodeAnalysis;
13 [SuppressMessage(
"ReSharper",
"MemberCanBePrivate.Global")]
14 [SuppressMessage(
"ReSharper",
"UnusedMember.Global")]
18 private readonly List<PropertyDescriptor>
mPropList =
new List<PropertyDescriptor>();
19 private readonly List<string>
mFakePars =
new List<string>();
25 [DynamicPropertyMaster]
39 mPropList.AddRange(TypeDescriptor.GetProperties(
this,noCustomTypeDesc:
true).OfType<PropertyDescriptor>());
57 TypeDescriptor.Refresh(
this);
60 #region Overrides of CustomTypeDescriptor
69 for(var index = 0; index <
mFakePars.Count; ++index)
89 #region Overrides of PropertyDescriptor
96 public override object GetValue(
object component)
106 public override void SetValue(
object component,
object value)
127 return $
"{mNoOfFakePars} Parameters, Values: {string.Join(",
", mFakePars)}";
135 #region Implementation of IAcquisitionServiceBase
137 public string Name =>
"MockDynamicParAcquisition";
140 public bool Abort {
private get;
set; } =
false;
144 #region Implementation of IAcquisitionService<DynamicAcqPars>
156 #region Implementation of IStandbySupportingAcquisitionService
160 WriteToRunlog?.Invoke(
"Mock acquisition service going to standby mode");
163 #region Implementation of IHaveRunlogOutput
Classes and interfaces that are meant for plugins. The classes and interfaces below this namespace ar...
Enables you to add support for a Chromatography Data System (or similar) to Chronos....
Implement this interface if you want to provide an acquisition service that is loaded on program star...
For services that can be put into some kind of standby mode (by an error method, for example)
Implement this interface if you have messages for our run log.
Parameter class for an acquisition service that has a variable number of properties.
readonly List< PropertyDescriptor > mPropList
override string ToString()
readonly List< string > mFakePars
IEnumerable< PropertyDescriptor > GetFakePropDescriptors()
override PropertyDescriptorCollection GetProperties()
Maps a property to an entry in our string list.
StringListPropertyDescriptor(List< string > fakePars, int index)
override Type ComponentType
override bool CanResetValue(object component)
override object GetValue(object component)
override Type PropertyType
override void SetValue(object component, object value)
override bool ShouldSerializeValue(object component)
readonly List< string > mParList
override void ResetValue(object component)
Acquisition service for a parameter class that has a variable number of properties.
bool IsAvailable
The place to check if you can actually use the acquisition service.
void RunAcquisition(DynamicAcqPars parameters)
void Validate(DynamicAcqPars parameters)
void GoToStandby()
Send the system to standby mode.
string Name
Name that is visible to the user in the list of acquisition services. Do not localize.
bool Abort
Will be set to true if you should abort the current acquisition. Will be set to false when everything...
Action< string > WriteToRunlog