Tp.Subversion.Subversion.Subversion.GetTextFileContent C# (CSharp) Method

GetTextFileContent() public method

public GetTextFileContent ( RevisionId changeset, string path ) : string
changeset Tp.SourceControl.VersionControlSystem.RevisionId
path string
return string
		public override string GetTextFileContent(RevisionId changeset, string path)
		{
			try
			{
				using (var stream = GetSVNFileStream(changeset, path))
				{
					stream.Position = 0;
					return new StreamReader(stream).ReadToEnd();
				}
			}
			catch (SvnFileSystemException ex)
			{
				throw new VersionControlException(String.Format("Subversion exception: {0}", ex.Message));
			}
		}

Usage Example

 public void GetTextFileContentUnknownRevision()
 {
     using (var s = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>()))
     {
         s.GetTextFileContent(99999.ToString(), "/TempSubversionTest/readme.txt");
     }
 }
All Usage Examples Of Tp.Subversion.Subversion.Subversion::GetTextFileContent