Skip to content

Commit 798dca5

Browse files
committed
Removed the shared assembly info files and started refactoring the docs.
1 parent afcb0a9 commit 798dca5

File tree

4 files changed

+22
-52
lines changed

4 files changed

+22
-52
lines changed

Connector.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# Projac.Connector
1+
# Projac
22

3-
Projac.Connector brings Projac's declarative style of authoring projections to projections that target any store for which you can bring your own connection.
3+
Projac brings a declarative style of authoring projections to projections that target any store for which you can bring your own connection.
44

5-
It's available on NuGet: [Projac.Connector](https://www.nuget.org/packages/Projac.Connector/)
5+
It's available on NuGet: [Projac](https://www.nuget.org/packages/Projac/)
66

77
# Authoring projections
88

99
## The Declarative Style
1010

11-
Similar to Projac's declarative style for sql projections, one can author projections that target Elasticsearch, Redis, RavenDb, WindowsAzure Table Storage, etc ... in a declarative way. A fundamental difference is that the handling and interpretation of messages is directly tied to the execution of actions against the respective store. Why? Because replicating the entire connection api into a set of statements would be too ambitious and brittle a goal. Only asynchronous projection handling is supported at the moment. Given we're dealing with I/O intensive operations that decision seems reasonable.
11+
One can author projections that target Elasticsearch, Redis, RavenDb, WindowsAzure Table Storage, etc ... in a declarative way. The handling and interpretation of messages is directly tied to the execution of actions against the respective store. Only asynchronous projection handling is supported at the moment. Given we're dealing with I/O intensive operations that decision seems reasonable.
1212

1313
### Elasticsearch
1414

1515
```csharp
16-
public class PortfolioProjection : ConnectedProjection<ElasticsearchClient>
16+
public class PortfolioProjection : Projection<ElasticsearchClient>
1717
{
1818
public PortfolioProjection()
1919
{
@@ -53,7 +53,7 @@ public class PortfolioProjection : ConnectedProjection<ElasticsearchClient>
5353
### Redis
5454

5555
```csharp
56-
public class PortfolioProjection : ConnectedProjection<ConnectionMultiplexer>
56+
public class PortfolioProjection : Projection<ConnectionMultiplexer>
5757
{
5858
public PortfolioProjection()
5959
{
@@ -81,7 +81,7 @@ public class PortfolioProjection : ConnectedProjection<ConnectionMultiplexer>
8181
### RavenDb
8282

8383
```csharp
84-
public class PortfolioProjection : ConnectedProjection<IAsyncDocumentSession>
84+
public class PortfolioProjection : Projection<IAsyncDocumentSession>
8585
{
8686
public PortfolioProjection()
8787
{
@@ -111,7 +111,7 @@ public class PortfolioProjection : ConnectedProjection<IAsyncDocumentSession>
111111
### Windows Azure Table Storage
112112

113113
```csharp
114-
public class PortfolioProjection : ConnectedProjection<CloudTableClient>
114+
public class PortfolioProjection : Projection<CloudTableClient>
115115
{
116116
public PortfolioProjection()
117117
{
@@ -158,11 +158,11 @@ public class PortfolioProjection : ConnectedProjection<CloudTableClient>
158158

159159
### Anonymous
160160

161-
Next to the *ConnectedProjection* approach, one can also use the *AnonymousConnectedProjectionBuilder* approach if you prefer to go class-less.
161+
Next to the *Projection* approach, one can also use the *AnonymousProjectionBuilder* approach if you prefer to go class-less.
162162

163163
```csharp
164164
var projection =
165-
new AnonymousConnectedProjectionBuilder<ElasticsearchClient>().
165+
new AnonymousProjectionBuilder<ElasticsearchClient>().
166166
When<PortfolioAdded>((client, message) =>
167167
client.IndexAsync(
168168
"index",
@@ -195,16 +195,16 @@ var projection =
195195

196196
# Executing projections
197197

198-
How and when you decide to execute the projections is still left as an exercise to you. Typically they will sit behind a message subscription that pushes the appropriate messages into them, causing the execution of actions against the store. You can use the ConnectedProjector to perform the actual execution.
198+
How and when you decide to execute the projections is still left as an exercise to you. Typically they will sit behind a message subscription that pushes the appropriate messages into them, causing the execution of actions against the store. You can use the Projector to perform the actual execution.
199199

200200
# Testing projections
201201

202-
Projac.Connector comes with an *API* that allows you to write tests for your projections at the right level of abstraction. Depending on the store you are integrating with, you may want to extend the syntax with extension methods that tuck away any boilerplate code. The general idea is that you author a scenario using *givens*, which are just messages, and verify that the store contains the expected data (and only the expected data) after projecting those messages using the projection under test.
202+
Projac comes with an *API* that allows you to write tests for your projections at the right level of abstraction. Depending on the store you are integrating with, you may want to extend the syntax with extension methods that tuck away any boilerplate code. The general idea is that you author a scenario using *givens*, which are just messages, and verify that the store contains the expected data (and only the expected data) after projecting those messages using the projection under test.
203203

204204
Given the following RavenDb projection ...
205205

206206
```csharp
207-
public class PortfolioProjection : ConnectedProjection<IAsyncDocumentSession>
207+
public class PortfolioProjection : Projection<IAsyncDocumentSession>
208208
{
209209
public PortfolioProjection()
210210
{
@@ -272,15 +272,15 @@ public class PortfolioProjectionTests
272272
```csharp
273273
public static class RavenProjectionScenario
274274
{
275-
public static ConnectedProjectionScenario<IAsyncDocumentSession> For(
276-
ConnectedProjectionHandler<IAsyncDocumentSession>[] handlers)
275+
public static ProjectionScenario<IAsyncDocumentSession> For(
276+
ProjectionHandler<IAsyncDocumentSession>[] handlers)
277277
{
278278
if (handlers == null) throw new ArgumentNullException("handlers");
279-
return new ConnectedProjectionScenario<IAsyncDocumentSession>(
279+
return new ProjectionScenario<IAsyncDocumentSession>(
280280
ConcurrentResolve.WhenEqualToHandlerMessageType(handlers));
281281
}
282282

283-
public static Task ExpectNone(this ConnectedProjectionScenario<IAsyncDocumentSession> scenario)
283+
public static Task ExpectNone(this ProjectionScenario<IAsyncDocumentSession> scenario)
284284
{
285285
return scenario
286286
.Verify(async session =>
@@ -306,7 +306,7 @@ public static class RavenProjectionScenario
306306
.Assert();
307307
}
308308

309-
public static Task Expect(this ConnectedProjectionScenario<IAsyncDocumentSession> scenario, params object[] documents)
309+
public static Task Expect(this ProjectionScenario<IAsyncDocumentSession> scenario, params object[] documents)
310310
{
311311
if (documents == null)
312312
throw new ArgumentNullException("documents");
@@ -368,7 +368,7 @@ public static class RavenProjectionScenario
368368
.Assert();
369369
}
370370

371-
public static async Task Assert(this ConnectedProjectionTestSpecification<IAsyncDocumentSession> specification)
371+
public static async Task Assert(this ProjectionTestSpecification<IAsyncDocumentSession> specification)
372372
{
373373
if (specification == null) throw new ArgumentNullException("specification");
374374
using (var store = new EmbeddableDocumentStore
@@ -381,7 +381,7 @@ public static class RavenProjectionScenario
381381
store.Initialize();
382382
using (var session = store.OpenAsyncSession())
383383
{
384-
await new ConnectedProjector<IAsyncDocumentSession>(specification.Resolver).
384+
await new Projector<IAsyncDocumentSession>(specification.Resolver).
385385
ProjectAsync(session, specification.Messages);
386386
await session.SaveChangesAsync();
387387

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Projac
22

3+
**Important Changes**
4+
35
[![Join the chat at https://gitter.im/yreynhout/Projac](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/yreynhout/Projac?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
46

57
Projac is a set of projection libraries that allow you to write projections targetting various backing stores.

src/SharedAssemblyInfo.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/SharedVersionInfo.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)