Skip to content

Instantly share code, notes, and snippets.

@dlidstrom
Created December 6, 2013 12:44
Show Gist options
  • Select an option

  • Save dlidstrom/7823173 to your computer and use it in GitHub Desktop.

Select an option

Save dlidstrom/7823173 to your computer and use it in GitHub Desktop.
Create projections from C#.
private static void Main(string[] args)
{
var projectionsManager = new ProjectionsManager(new ConsoleLogger(), new IPEndPoint(IPAddress.Loopback, 1113));
const string projStr =
"fromCategory('12-testentity').foreachStream().whenAny(function(s, e) { linkTo('test-12', e) })";
var credentials = new UserCredentials("admin", "changeit");
projectionsManager.CreateContinuous("$test-12", projStr, credentials);
projectionsManager.Enable("$test-12", credentials);
Console.ReadLine();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment