-
Notifications
You must be signed in to change notification settings - Fork 870
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial change to type-safe Diff.Compare
Fixes #1176.
- Loading branch information
Showing
8 changed files
with
127 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using LibGit2Sharp.Core.Handles; | ||
|
||
namespace LibGit2Sharp | ||
{ | ||
public class DiffSafeHandleProxy : IDisposable | ||
{ | ||
internal readonly DiffSafeHandle nativeHandle; | ||
|
||
internal DiffSafeHandleProxy(DiffSafeHandle handle) | ||
{ | ||
nativeHandle = handle; | ||
} | ||
|
||
#region IDisposable implementation | ||
|
||
void IDisposable.Dispose() | ||
{ | ||
nativeHandle.Dispose(); | ||
} | ||
|
||
#endregion | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
|
||
namespace LibGit2Sharp | ||
{ | ||
public interface IDiffResult<T> where T:class | ||
{ | ||
T FromNative(DiffSafeHandleProxy diff); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters