Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool isWebRefExistingInPom(string name, NPanday.Logging.Logger logger)
- {
- bool exists = false;
- StreamReader sr = null;
- name = name.Replace("\\", "/");
- try
- {
- sr = new StreamReader(pom.FullName);
- String temp = sr.ReadLine();
- while (temp != null)
- {
- if (temp.Contains(name))
- {
- exists = true;
- break;
- }
- temp = sr.ReadLine();
- }
- }
- catch
- {
- throw;
- }
- finally
- {
- try
- {
- if ( sr != null )
- {
- sr.Close();
- sr.Dispose();
- }
- }
- catch
- {
- if ( logger != null )
- {
- logger.Log(NPanday.Logging.Level.WARNING, "Failed to close PomHelperUtility reader.");
- }
- }
- }
- return exists;
- }
Add Comment
Please, Sign In to add comment