/// <summary>Returns <see cref="P:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary.Value" /> as a <see cref="T:System.String" />.</summary> /// <returns>A <see cref="T:System.String" /> that is obtained from <see cref="P:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary.Value" />.</returns> // Token: 0x06005662 RID: 22114 RVA: 0x001314B2 File Offset: 0x0012F6B2 public override string ToString() { if (this._value == null) { return(null); } return(SoapType.LineFeedsBin64(Convert.ToBase64String(this._value))); }
/// <summary>Converts the specified <see cref="T:System.String" /> into a <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary" /> object.</summary> /// <param name="value">The <see langword="String" /> to convert. </param> /// <returns>A <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary" /> object that is obtained from <paramref name="value" />.</returns> /// <exception cref="T:System.Runtime.Remoting.RemotingException">One of the following: /// <paramref name="value" /> is <see langword="null" />. The length of <paramref name="value" /> is less than 4.The length of <paramref name="value" /> is not a multiple of 4. </exception> // Token: 0x06005663 RID: 22115 RVA: 0x001314D0 File Offset: 0x0012F6D0 public static SoapBase64Binary Parse(string value) { if (value == null || value.Length == 0) { return(new SoapBase64Binary(new byte[0])); } byte[] value2; try { value2 = Convert.FromBase64String(SoapType.FilterBin64(value)); } catch (Exception) { throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_SOAPInteropxsdInvalid"), "base64Binary", value)); } return(new SoapBase64Binary(value2)); }
public static SoapBase64Binary Parse(string value) { byte[] buffer; if ((value == null) || (value.Length == 0)) { return(new SoapBase64Binary(new byte[0])); } try { buffer = Convert.FromBase64String(SoapType.FilterBin64(value)); } catch (Exception) { throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_SOAPInteropxsdInvalid"), new object[] { "base64Binary", value })); } return(new SoapBase64Binary(buffer)); }
/// <summary>将指定的 <see cref="T:System.String" /> 转换为 <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary" /> 对象。</summary> /// <returns>从 <paramref name="value" /> 获取的 <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary" /> 对象。</returns> /// <param name="value">要转换的 String。</param> /// <exception cref="T:System.Runtime.Remoting.RemotingException">以下之一:<paramref name="value" /> 为 null。<paramref name="value" /> 的长度小于4 。<paramref name="value" /> 的长度不是 4 的倍数。</exception> public static SoapBase64Binary Parse(string value) { if (value != null) { if (value.Length != 0) { byte[] numArray; try { numArray = Convert.FromBase64String(SoapType.FilterBin64(value)); } catch (Exception ex) { throw new RemotingException(string.Format((IFormatProvider)CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_SOAPInteropxsdInvalid"), (object)"base64Binary", (object)value)); } return(new SoapBase64Binary(numArray)); } } return(new SoapBase64Binary(new byte[0])); }
public override string ToString() { return(SoapType.Escape(this._value)); }
public static SoapHexBinary Parse(string value) { return(new SoapHexBinary(ToByteArray(SoapType.FilterBin64(value)))); }