C# Class GitRocketFilter.SimpleEntry

Represents a git blob or link in a tree.
Show file Open project: xoofx/GitRocketFilter Class Usage Examples

Public Methods

Method Description
GetBlobAsBytes ( ) : byte[]

Gets the content of the blob as a byte array.

GetBlobAsStream ( ) : Stream

Gets the content of the blob as a stream.

GetBlobAsText ( ) : string

Gets the content of the blob as a text.

SetBlob ( Blob newBlob, Mode mode = Mode.NonExecutableFile ) : void

Replace the content of this entry by a blob.

SetBlob ( Stream content, Mode mode = Mode.NonExecutableFile ) : void

Replace the content of this entry by a stream.

SetBlob ( byte content, Mode mode = Mode.NonExecutableFile ) : void

Replace the content of this entry by a byte array.

SetBlob ( string content, Encoding encoding, Mode mode = Mode.NonExecutableFile ) : void

Replace the content of this entry by a string with a particular encoding.

SetBlob ( string content, Mode mode = Mode.NonExecutableFile ) : void

Replace the content of this entry by a string.

ToString ( ) : string

Private Methods

Method Description
SimpleEntry ( Repository repo, TreeEntry entry ) : System

Initializes a new instance of the SimpleEntry struct.

Method Details

GetBlobAsBytes() public method

Gets the content of the blob as a byte array.
public GetBlobAsBytes ( ) : byte[]
return byte[]

GetBlobAsStream() public method

Gets the content of the blob as a stream.
public GetBlobAsStream ( ) : Stream
return Stream

GetBlobAsText() public method

Gets the content of the blob as a text.
public GetBlobAsText ( ) : string
return string

SetBlob() public method

Replace the content of this entry by a blob.
content
public SetBlob ( Blob newBlob, Mode mode = Mode.NonExecutableFile ) : void
newBlob Blob The content blob.
mode Mode The mode.
return void

SetBlob() public method

Replace the content of this entry by a stream.
content
public SetBlob ( Stream content, Mode mode = Mode.NonExecutableFile ) : void
content Stream The content stream.
mode Mode The mode.
return void

SetBlob() public method

Replace the content of this entry by a byte array.
content
public SetBlob ( byte content, Mode mode = Mode.NonExecutableFile ) : void
content byte The content byte array.
mode Mode The mode.
return void

SetBlob() public method

Replace the content of this entry by a string with a particular encoding.
content
public SetBlob ( string content, Encoding encoding, Mode mode = Mode.NonExecutableFile ) : void
content string The content string.
encoding System.Text.Encoding The encoding mode for the string.
mode Mode The mode.
return void

SetBlob() public method

Replace the content of this entry by a string.
content
public SetBlob ( string content, Mode mode = Mode.NonExecutableFile ) : void
content string The content string.
mode Mode The mode.
return void

ToString() public method

public ToString ( ) : string
return string