Ejemplo n.º 1
0
 private string GetCase(string str, CaseWriteMode cwm)
 {
     if (cwm == CaseWriteMode.ToUpper)
     {
         return(str.ToUpper());
     }
     if (cwm == CaseWriteMode.ToLower)
     {
         return(str.ToLower());
     }
     if (cwm == CaseWriteMode.ToTitle)
     {
         return(new CultureInfo("en-US", false).TextInfo.ToTitleCase(str));
     }
     else
     {
         return(str);
     }
 }
Ejemplo n.º 2
0
 public KONWriter(CaseWriteMode nodeNameWriteMode = CaseWriteMode.KeepOriginal, CaseWriteMode keyWriteMode = CaseWriteMode.KeepOriginal, CaseWriteMode valueWriteMode = CaseWriteMode.KeepOriginal)
 {
     NodeNameWriteMode = nodeNameWriteMode;
     KeyWriteMode      = keyWriteMode;
     ValueWriteMode    = valueWriteMode;
 }