/// <summary>
 /// Converts the given SIFSimpleType instance to an XML string value
 /// </summary>
 /// <param name="formatter">The formatter to sue for the current version of SIF being written to</param>
 /// <param name="sifType">The value to write</param>
 /// <returns>A string representing the XML payload used for the specified version
 /// of SIF. All types are nullable in SIF, so the resulting value could be null/</returns>
 public override String ToString(SifFormatter formatter,
                                 AdkDataType <DateTime?> sifType)
 {
     if (sifType.Value.HasValue)
     {
         return(formatter.ToTimeString(sifType.Value));
     }
     return(null);
 }
            /// <summary>
            /// Converts the given SIFSimpleType instance to an XML string value
            /// </summary>
            /// <param name="formatter">The formatter to sue for the current version of SIF being written to</param>
            /// <param name="value">The value to write</param>
            /// <returns>A string representing the XML payload used for the specified version
            /// of SIF. All types are nullable in SIF, so the resulting value could be null/</returns>
            public override String ToString(SifFormatter formatter,
                                            AdkDataType <float?> value)
            {
                float?i = value.Value;

                if (i.HasValue)
                {
                    return(formatter.ToString(i));
                }
                return(null);
            }
 /// <summary>
 /// Converts the given SIFSimpleType instance to an XML string value
 /// </summary>
 /// <param name="formatter">The formatter to sue for the current version of SIF being written to</param>
 /// <param name="sifType">The value to write</param>
 /// <returns>A string representing the XML payload used for the specified version
 /// of SIF. All types are nullable in SIF, so the resulting value could be null/</returns>
 public override String ToString(SifFormatter formatter,
                                 AdkDataType <string> sifType)
 {
     return(sifType.Value);
 }
Example #4
0
 /// <summary>
 /// Converts the given SIFSimpleType instance to an XML string value
 /// </summary>
 /// <param name="formatter">The formatter to sue for the current version of SIF being written to</param>
 /// <param name="value">The value to write</param>
 /// <returns>A string representing the XML payload used for the specified version
 /// of SIF. All types are nullable in SIF, so the resulting value could be null/</returns>
 public abstract String ToString(SifFormatter formatter,
                                 AdkDataType <T> value);