Пример #1
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="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);
 }
Пример #2
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 override String ToString(SifFormatter formatter,
                                            AdkDataType <float?> value)
            {
                float?i = value.Value;

                if (i.HasValue)
                {
                    return(formatter.ToString(i));
                }
                return(null);
            }
Пример #3
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="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);
 }
Пример #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);