Skip to content

Commit

Permalink
build improvements
Browse files Browse the repository at this point in the history
* disabled missing xml comment warnings to prevent hiding any relevant
  warnings
* renamed build targets
  • Loading branch information
rofr committed Apr 3, 2014
1 parent 2f14f92 commit 9434e9b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 24 deletions.
6 changes: 3 additions & 3 deletions build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
my $targets = {
default => sub
{
run qw|clean compile copy zip nuget_pack|;
run qw|clean compile copy zip pack|;
},
clean => sub
{
Expand All @@ -53,11 +53,11 @@
print "$sevenZip a -r -tzip $version-$config.zip build/*";
system "\"$sevenZip\" a -r -tzip $version-$config.zip build/*";
},
nuget_pack => sub
pack => sub
{
system("$nuget pack OrigoDB.Core.nuspec -OutputDirectory build -version $version -symbols")
},
nuget_publish => sub
push => sub
{
system "$nuget publish build/OrigoDB.Core.*.nupkg";
}
Expand Down
2 changes: 2 additions & 0 deletions src/OrigoDB.Core.UnitTests/OrigoDB.Core.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core">
Expand Down
20 changes: 6 additions & 14 deletions src/OrigoDB.Core/Clients/PartitionClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ public override void Execute(Command<TModel> command)
/// <summary>
/// Dispatch a command and merge the results
/// </summary>
/// <typeparam name="TResult"></typeparam>
/// <param name="command"></param>
/// <returns></returns>
public override TResult Execute<TResult>(Command<TModel, TResult> command)
{
var nodes = GetNodesFor(command);
Expand All @@ -112,30 +109,25 @@ public override TResult Execute<TResult>(Command<TModel, TResult> command)
/// <summary>
/// Execute a query on a specific node
/// </summary>
/// <param name="query"></param>
/// <param name="partition">Zero-based index of node to dispatch to</param>
public TResult Execute<TResult>(Query<TModel, TResult> query, int partition)
public TResult Execute<TResult>(Query<TModel, TResult> query, int nodeIndex)
{
return Nodes[partition].Execute(query);
return Nodes[nodeIndex].Execute(query);
}

/// <summary>
/// Execute on a specific node
/// </summary>
/// <param name="command"></param>
/// <param name="partition">Zero based index of the node to dispatch to</param>
public void Execute(Command<TModel> command, int partition)
public void Execute(Command<TModel> command, int nodeIndex)
{
Nodes[partition].Execute(command);
Nodes[nodeIndex].Execute(command);
}

/// <summary>
/// Execute on a specific node
/// </summary>
/// <param name="partition">The node index to dispatch to</param>
public TResult Execute<TResult>(Command<TModel, TResult> command, int partition)
public TResult Execute<TResult>(Command<TModel, TResult> command, int nodeIndex)
{
return Nodes[partition].Execute(command);
return Nodes[nodeIndex].Execute(command);
}

private Delegate GetDispatcherFor<T>(T obj)
Expand Down
1 change: 1 addition & 0 deletions src/OrigoDB.Core/OrigoDB.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\OrigoDB.Core.XML</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
7 changes: 0 additions & 7 deletions src/OrigoDB.Core/Storage/StoreExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ public static class StoreExtensions
/// <summary>
/// Get commands beginning from a specific entry id (inclusive)
/// </summary>
/// <param name="entryId"></param>
/// <returns></returns>
public static IEnumerable<JournalEntry<Command>> CommandEntriesFrom(this IStore store, ulong entryId)
{
return CommittedCommandEntries(() => store.GetJournalEntriesFrom(entryId));
Expand All @@ -19,8 +17,6 @@ public static IEnumerable<JournalEntry<Command>> CommandEntriesFrom(this IStore
/// <summary>
/// Get non rolled back commands from a point in time
/// </summary>
/// <param name="pointInTime"></param>
/// <returns></returns>
public static IEnumerable<JournalEntry<Command>> CommandEntriesFrom(this IStore store, DateTime pointInTime)
{
return CommittedCommandEntries(() => store.GetJournalEntriesBeforeOrAt(pointInTime));
Expand All @@ -29,8 +25,6 @@ public static IEnumerable<JournalEntry<Command>> CommandEntriesFrom(this IStore
/// <summary>
/// Select the items of type Command that are not followed by a rollback marker
/// </summary>
/// <param name="enumerator"></param>
/// <returns></returns>
public static IEnumerable<JournalEntry<Command>> CommittedCommandEntries(Func<IEnumerable<JournalEntry>> enumerator)
{

Expand All @@ -52,7 +46,6 @@ public static IEnumerable<JournalEntry<Command>> CommittedCommandEntries(Func<IE
/// <summary>
/// Get the complete sequence of commands starting, excluding any that were rolled back
/// </summary>
/// <returns></returns>
public static IEnumerable<JournalEntry<Command>> CommandEntries(this IStore store)
{
return store.CommandEntriesFrom(1);
Expand Down

0 comments on commit 9434e9b

Please sign in to comment.