1+ using System ;
12using System . Collections . Generic ;
23using AgGateway . ADAPT . ApplicationDataModel . Equipment ;
34using AgGateway . ADAPT . ApplicationDataModel . LoggedData ;
67
78namespace AgGateway . ADAPT . ISOv4Plugin . ObjectModel
89{
9- internal class ISOOperationData : OperationData
10+ internal class ISOOperationData : OperationData , IConvertible
1011 {
1112 /// <summary>
1213 /// An internal list of DeviceElementUses that are may be updated during import; not exposed on the public interface.
1314 /// </summary>
1415 internal List < DeviceElementUse > DeviceElementUses { get ; set ; } = new List < DeviceElementUse > ( ) ;
16+
17+ #region IConvertible impelementation
18+ public TypeCode GetTypeCode ( )
19+ {
20+ return TypeCode . Object ;
21+ }
22+
23+ public bool ToBoolean ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
24+
25+ public byte ToByte ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
26+
27+ public char ToChar ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
28+
29+ public DateTime ToDateTime ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
30+
31+ public decimal ToDecimal ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
32+
33+ public double ToDouble ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
34+
35+ public short ToInt16 ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
36+
37+ public int ToInt32 ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
38+
39+ public long ToInt64 ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
40+
41+ public sbyte ToSByte ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
42+
43+ public float ToSingle ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
44+
45+ public string ToString ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
46+
47+ public object ToType ( Type conversionType , IFormatProvider provider )
48+ {
49+ if ( conversionType == typeof ( ISOOperationData ) || conversionType == typeof ( OperationData ) )
50+ {
51+ return this ;
52+ }
53+ throw new NotImplementedException ( ) ;
54+ }
55+
56+ public ushort ToUInt16 ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
57+
58+ public uint ToUInt32 ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
59+
60+ public ulong ToUInt64 ( IFormatProvider provider ) => throw new NotImplementedException ( ) ;
61+ #endregion
1562 }
16- }
63+ }
0 commit comments