/// <summary> /// Formats the specified null ref token. /// </summary> /// <param name="nullRefToken">The null ref token.</param> /// <returns>The token in serialized form.</returns> protected override string Format(NullReferenceToken nullRefToken) { return(CreateNode(XmlStringConstants.NULL, new Dictionary <string, string> { { "name", nullRefToken.Name } })); }
/// <summary> /// Formats the specified null reference token. /// </summary> /// <param name="nullReferenceToken">The null reference token.</param> /// <returns>The token in serialized form.</returns> protected override string Format(NullReferenceToken nullReferenceToken) { StringBuilder sb = new StringBuilder(); if (isSepReq) { sb.Append(", "); } if (!string.IsNullOrEmpty(nullReferenceToken.Name)) { sb.Append(nullReferenceToken.Name); sb.Append('='); } sb.Append("<null>"); isSepReq = true; return(sb.ToString()); }
/// <summary> /// Formats the specified null reference token. /// </summary> /// <param name="nullReferenceToken">The null reference token.</param> /// <returns>The token in serialized form.</returns> protected abstract T Format(NullReferenceToken nullReferenceToken);
private void NullHandler(NullReferenceToken token) { SetValue(token.Name, null); }