예제 #1
0
 /// <summary>
 /// 根据字符串查找目标索引
 /// </summary>
 /// <param name="xmlDeSerializer">XML解析器</param>
 /// <returns>目标索引,null返回-1</returns>
 internal int SearchEnum(XmlDeSerializer xmlDeSerializer)
 {
     if (State != null)
     {
         if (xmlDeSerializer.IsCData == 0)
         {
             int index = searchEnumOnly(xmlDeSerializer);
             if (xmlDeSerializer.State == DeSerializeState.Success)
             {
                 xmlDeSerializer.SearchValueEnd();
                 return(index);
             }
         }
         else
         {
             xmlDeSerializer.SearchCDataValue();
             if (xmlDeSerializer.State == DeSerializeState.Success)
             {
                 return(searchCDataEnum(xmlDeSerializer));
             }
         }
     }
     return(-1);
 }