Ejemplo n.º 1
0
 public static string GetName(DocumentStore document_store, string p)
 {
     string x = p;
     while (AlreadyExistInUniqueConstraintNameList(document_store, x))
     {
         string sWithoutNumber = "";
         int iNum = GetStringLastNumber(x, ref sWithoutNumber);
         iNum++;
         x = sWithoutNumber + iNum;
     }
     return x;
 }
Ejemplo n.º 2
0
 private static bool AlreadyExistInUniqueConstraintNameList(DocumentStore document_store, string x)
 {
     foreach (DocumentItem doc_item in document_store.items)
     {
         if (doc_item.name.Equals(x))
         {
             return true;
         }
     }
     return false;
 }