Esempio n. 1
0
 internal virtual void  ValidateField(Fieldable f)
 {
     System.String val = f.StringValue();
     if (!val.StartsWith("^") || !val.EndsWith("$"))
     {
         throw new System.SystemException("Invalid field:" + f.ToString() + " val=" + val);
     }
 }
Esempio n. 2
0
 /// <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++)
     {
         Fieldable field = (Fieldable)fields[i];
         buffer.Append(field.ToString());
         if (i != fields.Count - 1)
         {
             buffer.Append(" ");
         }
     }
     buffer.Append(">");
     return(buffer.ToString());
 }
		internal virtual void  ValidateField(Fieldable f)
		{
			System.String val = f.StringValue();
			if (!val.StartsWith("^") || !val.EndsWith("$"))
			{
				throw new System.SystemException("Invalid field:" + f.ToString() + " val=" + val);
			}
		}