/// <summary> /// Convets a ProjectOutputGroups instance into a semicolon delimited by semicolons. /// </summary> /// <param name="pogs">ProjectOutputGroups instance to convert.</param> /// <returns>Semicolon delimited list of POGs.</returns> public static string PogList(ProjectOutputGroups pogs) { StringBuilder ret = new StringBuilder(); if ((pogs & ProjectOutputGroups.Binaries) == ProjectOutputGroups.Binaries) { ret.Append(";Binaries"); } if ((pogs & ProjectOutputGroups.Symbols) == ProjectOutputGroups.Symbols) { ret.Append(";Symbols"); } if ((pogs & ProjectOutputGroups.Sources) == ProjectOutputGroups.Sources) { ret.Append(";Sources"); } if ((pogs & ProjectOutputGroups.Content) == ProjectOutputGroups.Content) { ret.Append(";Content"); } if ((pogs & ProjectOutputGroups.Satellites) == ProjectOutputGroups.Satellites) { ret.Append(";Satellites"); } if ((pogs & ProjectOutputGroups.Documents) == ProjectOutputGroups.Documents) { ret.Append(";Documents"); } if (ret.Length > 0) { // remove the first semicolon return(ret.ToString().Substring(1)); } else { return(String.Empty); } }
/// <summary> /// Converts a string of POGs into a ProjectOutputGroups instance. /// </summary> /// <param name="pogList">String of POGs separated by semicolons.</param> /// <returns>A new ProjectOutputGroups instance.</returns> public static ProjectOutputGroups ParsePogList(string pogList) { ProjectOutputGroups ret = ProjectOutputGroups.None; string[] pogs = pogList.Split(';'); foreach (string pog in pogs) { switch (pog) { case "Binaries": ret |= ProjectOutputGroups.Binaries; break; case "Symbols": ret |= ProjectOutputGroups.Symbols; break; case "Sources": ret |= ProjectOutputGroups.Sources; break; case "Content": ret |= ProjectOutputGroups.Content; break; case "Satellites": ret |= ProjectOutputGroups.Satellites; break; case "Documents": ret |= ProjectOutputGroups.Documents; break; } } return(ret); }
/// <summary> /// Convets a ProjectOutputGroups instance into a semicolon delimited by semicolons. /// </summary> /// <param name="pogs">ProjectOutputGroups instance to convert.</param> /// <returns>Semicolon delimited list of POGs.</returns> public static string PogList(ProjectOutputGroups pogs) { StringBuilder ret = new StringBuilder(); if ((pogs & ProjectOutputGroups.Binaries) == ProjectOutputGroups.Binaries) { ret.Append(";Binaries"); } if ((pogs & ProjectOutputGroups.Symbols) == ProjectOutputGroups.Symbols) { ret.Append(";Symbols"); } if ((pogs & ProjectOutputGroups.Sources) == ProjectOutputGroups.Sources) { ret.Append(";Sources"); } if ((pogs & ProjectOutputGroups.Content) == ProjectOutputGroups.Content) { ret.Append(";Content"); } if ((pogs & ProjectOutputGroups.Satellites) == ProjectOutputGroups.Satellites) { ret.Append(";Satellites"); } if ((pogs & ProjectOutputGroups.Documents) == ProjectOutputGroups.Documents) { ret.Append(";Documents"); } if (ret.Length > 0) { // remove the first semicolon return ret.ToString().Substring(1); } else { return String.Empty; } }