Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-04-20 00:16:28 +0400
committernulltoken <emeric.fermas@gmail.com>2011-04-20 16:25:30 +0400
commit38b102f83ac8dd697d50523700d3a3ecee03d437 (patch)
treef27a9c1748cf33d0b38575fc79f50ee9608d6d2c /LibGit2Sharp/Blob.cs
parent0fd88f980251fd75ab607a5419dbf40558c5cdd4 (diff)
Enforce naming convention
Diffstat (limited to 'LibGit2Sharp/Blob.cs')
-rw-r--r--LibGit2Sharp/Blob.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/LibGit2Sharp/Blob.cs b/LibGit2Sharp/Blob.cs
index c1a6be79..3019333b 100644
--- a/LibGit2Sharp/Blob.cs
+++ b/LibGit2Sharp/Blob.cs
@@ -8,12 +8,12 @@ namespace LibGit2Sharp
{
public class Blob : GitObject
{
- private readonly Repository _repo;
+ private readonly Repository repo;
internal Blob(Repository repo, ObjectId id)
: base(id)
{
- _repo = repo;
+ this.repo = repo;
}
public int Size { get; set; }
@@ -22,10 +22,10 @@ namespace LibGit2Sharp
{
get
{
- using (var obj = new ObjectSafeWrapper(Id, _repo))
+ using (var obj = new ObjectSafeWrapper(Id, repo))
{
var arr = new byte[Size];
- Marshal.Copy(NativeMethods.git_blob_rawcontent(obj.Obj), arr, 0, Size);
+ Marshal.Copy(NativeMethods.git_blob_rawcontent(obj.ObjectPtr), arr, 0, Size);
return arr;
}
}
@@ -35,9 +35,9 @@ namespace LibGit2Sharp
{
get
{
- using (var obj = new ObjectSafeWrapper(Id, _repo))
+ using (var obj = new ObjectSafeWrapper(Id, repo))
{
- IntPtr ptr = NativeMethods.git_blob_rawcontent(obj.Obj);
+ IntPtr ptr = NativeMethods.git_blob_rawcontent(obj.ObjectPtr);
unsafe
{
return new UnmanagedMemoryStream((byte*) ptr.ToPointer(), Size);
@@ -46,7 +46,6 @@ namespace LibGit2Sharp
}
}
-
public string ContentAsUtf8()
{
return Encoding.UTF8.GetString(Content);