C# Class GitSharp.Core.Constants

Show file Open project: jagregory/GitSharp Class Usage Examples

Public Properties

Property Type Description
CHARSET System.Text.Encoding
PACK_SIGNATURE byte[]
RefSearchPaths string[]
TYPE_TAG string

Public Methods

Method Description
decodeTypeString ( AnyObjectId id, byte typeString, byte endMark, MutableInteger offset ) : int

Parse an encoded type string into a type constant.

encode ( string str ) : byte[]

Convert a string to a byte array in UTF-8 character encoding.

encodeASCII ( long s ) : byte[]

Convert an integer into its decimal representation.

encodeASCII ( string s ) : byte[]

Convert a string to US-ASCII encoding.

encodedTypeString ( int typeCode ) : byte[]

Convert an OBJ_* type constant to an ASCII encoded string constant. The ASCII encoded string is often the canonical representation of the type within a loose object header, or within a tag header.

newMessageDigest ( ) : MessageDigest

Create a new digest function for objects.

typeString ( int typeCode ) : string

Convert an OBJ_* type constant to a TYPE_* type constant.

Method Details

decodeTypeString() public static method

Parse an encoded type string into a type constant.
public static decodeTypeString ( AnyObjectId id, byte typeString, byte endMark, MutableInteger offset ) : int
id AnyObjectId /// this type string came from; may be null if /// that is not known at the time the parse is occurring. ///
typeString byte string version of the type code.
endMark byte /// Character immediately following the type string. Usually ' ' /// (space) or '\n' (line feed). ///
offset MutableInteger /// Position within where the parse /// should start. Updated with the new position (just past /// when the parse is successful). ///
return int

encode() public static method

Convert a string to a byte array in UTF-8 character encoding.
public static encode ( string str ) : byte[]
str string /// The string to convert. May contain any Unicode characters. ///
return byte[]

encodeASCII() public static method

Convert an integer into its decimal representation.
public static encodeASCII ( long s ) : byte[]
s long the integer to convert.
return byte[]

encodeASCII() public static method

Convert a string to US-ASCII encoding.
/// The input string contains one or more characters outside of /// the 7-bit ASCII character space. ///
public static encodeASCII ( string s ) : byte[]
s string /// The string to convert. Must not contain any characters over /// 127 (outside of 7-bit ASCII). ///
return byte[]

encodedTypeString() public static method

Convert an OBJ_* type constant to an ASCII encoded string constant. The ASCII encoded string is often the canonical representation of the type within a loose object header, or within a tag header.
public static encodedTypeString ( int typeCode ) : byte[]
typeCode int /// typeCode the type code, from a pack representation. ///
return byte[]

newMessageDigest() public static method

Create a new digest function for objects.
public static newMessageDigest ( ) : MessageDigest
return MessageDigest

typeString() public static method

Convert an OBJ_* type constant to a TYPE_* type constant.
public static typeString ( int typeCode ) : string
typeCode int /// typeCode the type code, from a pack representation. ///
return string

Property Details

CHARSET public static property

Native character encoding for commit messages, file names...
public static Encoding,System.Text CHARSET
return System.Text.Encoding

PACK_SIGNATURE public static property

Pack file signature that occurs at file header - identifies file as Git packfile formatted. This constant is fixed and is defined by the Git packfile format.
public static byte[] PACK_SIGNATURE
return byte[]

RefSearchPaths public static property

public static string[] RefSearchPaths
return string[]

TYPE_TAG public static property

Text string that identifies an object as an annotated tag. Annotated tags store a pointer to any other object, and an additional message. It is most commonly used to record a stable release of the project.
public static string TYPE_TAG
return string