Skip to content

Commit

Permalink
Remove reset from public api
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhen Li committed Jan 18, 2017
1 parent ed96dc9 commit e381dce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 8 additions & 0 deletions Neo4j.Driver/Neo4j.Driver.IntegrationTests/DirectDriverIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -772,4 +772,12 @@ public async void ShouldThrowExceptionIfErrorAfterResetButNotConsumed()
}
}
}
internal static class SessionExtension
{
public static void Reset(this ISession session)
{
var sessionWithReset = (Session)session;
sessionWithReset.Reset();
}
}
}
5 changes: 4 additions & 1 deletion Neo4j.Driver/Neo4j.Driver/Internal/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ private void EnsureNoOpenTransaction()

public Guid Id { get; } = Guid.NewGuid();

public void Reset()
/// <summary>
/// Internal use only.
/// </summary>
internal void Reset()
{
EnsureSessionIsOpen();
EnsureConnectionIsHealthy();
Expand Down
8 changes: 0 additions & 8 deletions Neo4j.Driver/Neo4j.Driver/V1/ISession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ public interface ISession : IStatementRunner
/// If no bookmark was received or if this transaction was rolled back, the bookmark value will be null.
/// </summary>
string LastBookmark { get; }

/// <summary>
/// Reset the current session. This sends an immediate RESET signal to the server which both interrupts
/// any statement that is currently executing and ignores any subsequently queued statements.Following
/// the reset, the current transaction will have been rolled back and any outstanding failures will
/// have been acknowledged.
/// </summary>
void Reset();
}

/// <summary>
Expand Down

0 comments on commit e381dce

Please sign in to comment.