C# Class Git.Core.Object

Class that holds the basic object information
Show file Open project: igorgue/git-sharp

Public Methods

Method Description
CreateObjectHeader ( Type objType, string dataSize ) : byte[]

Create a header for a Git hash

DecodeObject ( byte content ) : Object
Object ( Type type, byte content ) : System
StringToType ( string type ) : Type
TypeToString ( Type type ) : string

Convert a type to its string representation

Protected Methods

Method Description
Decode ( ) : byte[]
Encode ( byte data ) : void
EncodeHeader ( MemoryStream &ms, Type type, string length ) : void
EncodeHeader ( MemoryStream &ms, byte header ) : void
EncodeInteger ( MemoryStream &ms, int integer ) : void
EncodeNewLine ( MemoryStream &ms ) : void
EncodeSpace ( MemoryStream &ms ) : void
EncodeString ( MemoryStream &ms, string str ) : void
EncodeTreeEntry ( MemoryStream &ms, byte mode, string name, byte id ) : void
EncodeZero ( MemoryStream &ms ) : void
ParseHeader ( byte input, int &pos, Type &type, string &length ) : bool
ParseInteger ( byte input, int &pos, int &integer ) : bool
ParseNewLine ( byte input, int &pos ) : bool
ParseNoSpaceString ( byte input, int &pos, string &str ) : bool
ParseSpace ( byte input, int &pos ) : bool
ParseString ( byte input, int &pos, string &str ) : bool
ParseTreeEntry ( byte input, int &pos, byte &mode, string &name, byte &id ) : bool
ParseType ( byte input, int &pos, Type &type ) : bool
ParseZero ( byte input, int &pos ) : bool

Method Details

CreateObjectHeader() public static method

Create a header for a Git hash
public static CreateObjectHeader ( Type objType, string dataSize ) : byte[]
objType System.Type /// Type of the object to hash ///
dataSize string /// Size of the object to hash ///
return byte[]

Decode() protected abstract method

protected abstract Decode ( ) : byte[]
return byte[]

DecodeObject() public static method

public static DecodeObject ( byte content ) : Object
content byte
return Object

Encode() protected abstract method

protected abstract Encode ( byte data ) : void
data byte
return void

EncodeHeader() protected static method

protected static EncodeHeader ( MemoryStream &ms, Type type, string length ) : void
ms System.IO.MemoryStream
type System.Type
length string
return void

EncodeHeader() protected static method

protected static EncodeHeader ( MemoryStream &ms, byte header ) : void
ms System.IO.MemoryStream
header byte
return void

EncodeInteger() protected static method

protected static EncodeInteger ( MemoryStream &ms, int integer ) : void
ms System.IO.MemoryStream
integer int
return void

EncodeNewLine() protected static method

protected static EncodeNewLine ( MemoryStream &ms ) : void
ms System.IO.MemoryStream
return void

EncodeSpace() protected static method

protected static EncodeSpace ( MemoryStream &ms ) : void
ms System.IO.MemoryStream
return void

EncodeString() protected static method

protected static EncodeString ( MemoryStream &ms, string str ) : void
ms System.IO.MemoryStream
str string
return void

EncodeTreeEntry() protected static method

protected static EncodeTreeEntry ( MemoryStream &ms, byte mode, string name, byte id ) : void
ms System.IO.MemoryStream
mode byte
name string
id byte
return void

EncodeZero() protected static method

protected static EncodeZero ( MemoryStream &ms ) : void
ms System.IO.MemoryStream
return void

Object() public method

public Object ( Type type, byte content ) : System
type System.Type
content byte
return System

ParseHeader() protected static method

protected static ParseHeader ( byte input, int &pos, Type &type, string &length ) : bool
input byte
pos int
type System.Type
length string
return bool

ParseInteger() protected static method

protected static ParseInteger ( byte input, int &pos, int &integer ) : bool
input byte
pos int
integer int
return bool

ParseNewLine() protected static method

protected static ParseNewLine ( byte input, int &pos ) : bool
input byte
pos int
return bool

ParseNoSpaceString() protected static method

protected static ParseNoSpaceString ( byte input, int &pos, string &str ) : bool
input byte
pos int
str string
return bool

ParseSpace() protected static method

protected static ParseSpace ( byte input, int &pos ) : bool
input byte
pos int
return bool

ParseString() protected static method

protected static ParseString ( byte input, int &pos, string &str ) : bool
input byte
pos int
str string
return bool

ParseTreeEntry() protected static method

protected static ParseTreeEntry ( byte input, int &pos, byte &mode, string &name, byte &id ) : bool
input byte
pos int
mode byte
name string
id byte
return bool

ParseType() protected static method

protected static ParseType ( byte input, int &pos, Type &type ) : bool
input byte
pos int
type System.Type
return bool

ParseZero() protected static method

protected static ParseZero ( byte input, int &pos ) : bool
input byte
pos int
return bool

StringToType() public static method

public static StringToType ( string type ) : Type
type string
return System.Type

TypeToString() public static method

Convert a type to its string representation
public static TypeToString ( Type type ) : string
type System.Type
return string