internal virtual void ValidateField(IFieldable f) { System.String val = f.StringValue; if (!val.StartsWith("^") || !val.EndsWith("$")) { throw new System.SystemException("Invalid field:" + f.ToString() + " val=" + val); } }
/// <summary>Prints the fields of a document for human consumption. </summary> public override System.String ToString() { System.Text.StringBuilder buffer = new System.Text.StringBuilder(); buffer.Append("Document<"); for (int i = 0; i < fields.Count; i++) { IFieldable field = fields[i]; buffer.Append(field.ToString()); if (i != fields.Count - 1) { buffer.Append(" "); } } buffer.Append(">"); return(buffer.ToString()); }