NGit.Patch.Patch.Parse C# (CSharp) Method

Parse() public method

Parse a patch received from an InputStream.
Parse a patch received from an InputStream.

Multiple parse calls on the same instance will concatenate the patch data, but each parse input must start with a valid file header (don't split a single file across parse calls).

there was an error reading from the input stream. ///
public Parse ( InputStream @is ) : void
@is Sharpen.InputStream
return void
        public virtual void Parse(InputStream @is)
        {
            byte[] buf = ReadFully(@is);
            Parse(buf, 0, buf.Length);
        }

Same methods

Patch::Parse ( byte buf, int ptr, int end ) : void

Usage Example

Esempio n. 1
0
 /// <exception cref="System.IO.IOException"></exception>
 private NGit.Patch.Patch ParseTestPatchFile()
 {
     using (var @in = GetResourceStream())
     {
         NGit.Patch.Patch p = new NGit.Patch.Patch();
         p.Parse(@in);
         return(p);
     }
 }
All Usage Examples Of NGit.Patch.Patch::Parse