public static void SetSourceMapping(this QueueListSource <HistoryData> source, ITag currentTag) { if (currentTag != null) { switch (currentTag.Address.VarType) { case DataType.BOOL: source.SetYMapping(Y => Y.Value.Boolean ? 1 : 0); break; case DataType.BYTE: source.SetYMapping(Y => Y.Value.Byte); break; case DataType.WORD: case DataType.SHORT: source.SetYMapping(Y => Y.Value.Int16); break; case DataType.TIME: case DataType.INT: source.SetYMapping(Y => Y.Value.Int32); break; case DataType.FLOAT: source.SetYMapping(Y => Y.Value.Single); break; } } }
public QueueListIterator(QueueListSource <T> dataSource) { this.dataSource = dataSource; this.enumerator = dataSource.collection.GetEnumerator(); }