Inheritance: ISoapXsd
Exemplo n.º 1
0
        /// <summary>Converts the specified <see cref="T:System.String" /> into a <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate" /> object.</summary>
        /// <returns>A <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate" /> object that is obtained from <paramref name="value" />.</returns>
        /// <param name="value">The <see cref="T:System.String" /> to convert. </param>
        /// <exception cref="T:System.Runtime.Remoting.RemotingException">
        ///   <paramref name="value" /> does not contain a date and time that corresponds to any of the recognized format patterns. </exception>
        public static SoapDate Parse(string value)
        {
            DateTime value2   = DateTime.ParseExact(value, SoapDate._datetimeFormats, null, DateTimeStyles.None);
            SoapDate soapDate = new SoapDate(value2);

            if (value.StartsWith("-"))
            {
                soapDate.Sign = -1;
            }
            else
            {
                soapDate.Sign = 0;
            }
            return(soapDate);
        }
Exemplo n.º 2
0
        public static SoapDate Parse(string value)
        {
            DateTime d = DateTime.ParseExact(value, _datetimeFormats, null, DateTimeStyles.None);

            SoapDate res = new SoapDate(d);

            if (value.StartsWith("-"))
            {
                res.Sign = -1;
            }
            else
            {
                res.Sign = 0;
            }
            return(res);
        }
Exemplo n.º 3
0
		public static SoapDate Parse (string value)
		{
			DateTime d = DateTime.ParseExact (value, _datetimeFormats, null, DateTimeStyles.None);
			
			SoapDate res = new SoapDate (d);
			if (value.StartsWith ("-")) res.Sign = -1;
			else res.Sign = 0;
			return res;
		}