Exemplo n.º 1
0
 /// <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());
        }
Exemplo n.º 3
0
 /// <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);
Exemplo n.º 4
0
 private void NullHandler(NullReferenceToken token)
 {
     SetValue(token.Name, null);
 }