Skip to content

Commit

Permalink
Updated nugets and readme and version
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Swann committed Feb 10, 2015
1 parent c181565 commit 775f983
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 141 deletions.
54 changes: 52 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,58 @@ If you have a MultiNode (Pipeline/Group/FirstMatch) that has a subject Type of T
Create an envelope for your subject and use this as the subject passed to the flow instead of passing the naked subject. This envelope can contain the subject
but can also contain other properties or data that is necessary for the workflow. Favor this over sending information in the State property of the ExecutionContext.

####Lots of examples present in the unit tests...

####See the [Wiki for release notes](https://github.com/eswann/Banzai/wiki).

##Banzai.JavaScript
Banzai.JavaScript allows you to create nodes that accept javascript as the language of use.
The JavaScript is executed using the ClearScript.V8 engine (wrapper around V8) by way of ClearScript.Manager.
For more information about using ClearScript Manager, please check out it's [Project Page](https://github.com/eswann/clearscript.manager).

Adding Banzai.JavaScript also adds extensions for configuring the flow to dynamically add JavaScript to both the Execution and ShouldExecute functionalities.

Execution:

flowBuilder.CreateFlow("TestFlow1")
.AddRoot<ITestJsNode>()
.SetExecutedJavaScript("context.Subject.TestValueString = 'Hello JavaScript!';")
.SetShouldExecuteJavaScript("result.ShouldExecute = true;");

For several other examples, look at the Banzai.JavaScript.Test and Banzai.Json.Test projects.

##Banzai.Json
Banzai.Json allow Banzai flows to be serialized as JSON strings so that they can be stored and rehydrated. Alternately, a flow can be
entirely defined in JSON.

###Implementing IComponentSerializer
In order to serialize flows in any format, a provider can be created by implementing IComponentSerializer.
The JSON serializer uses JSON.Net for this purpose.

The JSON serializer can be registered by calling:

Banzai.Json.Registrar.RegisterAsDefault();

Internally, this simply sets the serializer to be used:

Banzai.Serialization.SerializerProvider.Serializer = new JsonComponentSerializer();

###Abbreviating the JSON Output

Typically, the output of JSON serialization is fairly verbose when it comes to serializing types.
Banzai.Json allows these items to be abbreviated using the following calls:

In order to abbreviate the core node types, the following call can be made in configuration. This is automatically called when using Banzai.Json.

TypeAbbreviationCache.RegisterCoreTypes();

To add additional types to the abbreviations:

//Register a single type
TypeAbbreviationCache.RegisterType(Typeof(MyNode), optionalName);
//By Assembly
TypeAbbreviationCache.RegisterFromAssembly(AssemblyContainingMyNodes);


##Lots of examples present in the unit tests...

####See the [Wiki for release notes](https://github.com/eswann/Banzai/wiki).

16 changes: 8 additions & 8 deletions src/Banzai.JavaScript.Test/Banzai.JavaScript.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
<HintPath>..\packages\Autofac.3.4.0\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ClearScript">
<HintPath>..\packages\ClearScript.Installer.1.0.1.31662\lib\net45\ClearScript.dll</HintPath>
</Reference>
<Reference Include="ClearScript.Manager, Version=1.3.3.18070, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ClearScript, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClearScript.Manager.1.3.3.18070\lib\net45\ClearScript.Manager.dll</HintPath>
<HintPath>..\packages\ClearScript.Installer.1.0.3.20340\lib\net45\ClearScript.dll</HintPath>
</Reference>
<Reference Include="ClearScript.Manager.Http, Version=1.3.3.18070, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClearScript.Manager.Http.1.3.3.18070\lib\net45\ClearScript.Manager.Http.dll</HintPath>
<Reference Include="ClearScript.Manager">
<HintPath>..\packages\ClearScript.Manager.1.3.4.26813\lib\net45\ClearScript.Manager.dll</HintPath>
</Reference>
<Reference Include="ClearScript.Manager.Http">
<HintPath>..\packages\ClearScript.Manager.Http.1.3.4.26814\lib\net45\ClearScript.Manager.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
Expand Down
Binary file modified src/Banzai.JavaScript.Test/ClearScriptV8-32.dll
Binary file not shown.
Binary file modified src/Banzai.JavaScript.Test/ClearScriptV8-32.pdb
Binary file not shown.
Binary file modified src/Banzai.JavaScript.Test/ClearScriptV8-64.dll
Binary file not shown.
Binary file modified src/Banzai.JavaScript.Test/ClearScriptV8-64.pdb
Binary file not shown.
6 changes: 3 additions & 3 deletions src/Banzai.JavaScript.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.4.0" targetFramework="net45" />
<package id="ClearScript.Installer" version="1.0.1.31662" targetFramework="net45" />
<package id="ClearScript.Manager" version="1.3.3.18070" targetFramework="net45" />
<package id="ClearScript.Manager.Http" version="1.3.3.18070" targetFramework="net45" />
<package id="ClearScript.Installer" version="1.0.3.20340" targetFramework="net45" />
<package id="ClearScript.Manager" version="1.3.4.26813" targetFramework="net45" />
<package id="ClearScript.Manager.Http" version="1.3.4.26814" targetFramework="net45" />
<package id="jQuery" version="2.1.1" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
Expand Down
7 changes: 4 additions & 3 deletions src/Banzai.JavaScript/Banzai.JavaScript.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@
<DocumentationFile>bin\Release\Banzai.JavaScript.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="ClearScript">
<HintPath>..\packages\ClearScript.Installer.1.0.1.31662\lib\net45\ClearScript.dll</HintPath>
<Reference Include="ClearScript, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClearScript.Installer.1.0.3.20340\lib\net45\ClearScript.dll</HintPath>
</Reference>
<Reference Include="ClearScript.Manager, Version=1.3.3.18070, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClearScript.Manager.1.3.3.18070\lib\net45\ClearScript.Manager.dll</HintPath>
<HintPath>..\packages\ClearScript.Manager.1.3.4.26813\lib\net45\ClearScript.Manager.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
4 changes: 2 additions & 2 deletions src/Banzai.JavaScript/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClearScript.Installer" version="1.0.1.31662" targetFramework="net45" />
<package id="ClearScript.Manager" version="1.3.3.18070" targetFramework="net45" />
<package id="ClearScript.Installer" version="1.0.3.20340" targetFramework="net45" />
<package id="ClearScript.Manager" version="1.3.4.26813" targetFramework="net45" />
</packages>
24 changes: 4 additions & 20 deletions src/Banzai.Json.Test/Banzai.Json.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@
</Reference>
<Reference Include="ClearScript, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClearScript.Installer.1.0.2.24298\lib\net45\ClearScript.dll</HintPath>
<HintPath>..\packages\ClearScript.Installer.1.0.3.20340\lib\net45\ClearScript.dll</HintPath>
</Reference>
<Reference Include="ClearScript.Manager">
<HintPath>..\packages\ClearScript.Manager.1.3.3.18070\lib\net45\ClearScript.Manager.dll</HintPath>
</Reference>
<Reference Include="ClearScript.Manager.Http">
<HintPath>..\packages\ClearScript.Manager.Http.1.3.3.18070\lib\net45\ClearScript.Manager.Http.dll</HintPath>
<Reference Include="ClearScript.Manager, Version=1.3.4.26813, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClearScript.Manager.1.3.4.26813\lib\net45\ClearScript.Manager.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -58,14 +56,6 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down Expand Up @@ -118,7 +108,6 @@
<Content Include="ClearScriptV8-64.pdb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scripts\request.js" />
<Content Include="v8-ia32.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand All @@ -133,11 +122,6 @@
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Binary file modified src/Banzai.Json.Test/ClearScriptV8-32.dll
Binary file not shown.
Binary file modified src/Banzai.Json.Test/ClearScriptV8-32.pdb
Binary file not shown.
Binary file modified src/Banzai.Json.Test/ClearScriptV8-64.dll
Binary file not shown.
Binary file modified src/Banzai.Json.Test/ClearScriptV8-64.pdb
Binary file not shown.
94 changes: 0 additions & 94 deletions src/Banzai.Json.Test/Scripts/request.js

This file was deleted.

8 changes: 2 additions & 6 deletions src/Banzai.Json.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.4.0" targetFramework="net45" />
<package id="ClearScript.Installer" version="1.0.2.24298" targetFramework="net45" />
<package id="ClearScript.Manager" version="1.3.3.18070" targetFramework="net45" />
<package id="ClearScript.Manager.Http" version="1.3.3.18070" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="ClearScript.Installer" version="1.0.3.20340" targetFramework="net45" />
<package id="ClearScript.Manager" version="1.3.4.26813" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net45" />
<package id="NUnit" version="2.6.3" targetFramework="net45" />
<package id="Should" version="1.1.20" targetFramework="net45" />
Expand Down
6 changes: 3 additions & 3 deletions src/Banzai/Properties/SolutionVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

[assembly: AssemblyProduct("Banzai")]
[assembly: AssemblyCopyright("Copyright 2014 Eric Swann - All rights reserved.")]
[assembly: AssemblyVersion("1.3.0")]
[assembly: AssemblyFileVersion("1.3.0")]
[assembly: AssemblyVersion("1.3.1")]
[assembly: AssemblyFileVersion("1.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyInformationalVersion("1.3.0.11")]
[assembly: AssemblyInformationalVersion("1.3.1.0")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]

0 comments on commit 775f983

Please sign in to comment.