Skip to content

Commit 28362fa

Browse files
authored
Merge pull request #453 from MarketFactory/dotnet-alpha1
Initial restoration of csharp generator (alpha1)
2 parents 67cb02c + b209c19 commit 28362fa

File tree

80 files changed

+9293
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+9293
-14
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,25 @@ gocode/src/example-schema/cpu.out
9191
gocode/src/extension
9292
gocode/src/extension2
9393

94+
# csharp
95+
csharp/*/bin
96+
csharp/*/obj
97+
csharp/.nuget/sbe-tool*.nupkg
98+
csharp/.nuget/sbe-tool-all.jar
99+
csharp/.nuget/examples/bin
100+
csharp/.nuget/examples/obj
101+
csharp/.nuget/examples/packages
102+
csharp/.nuget/examples/.vs
103+
csharp/.vs
104+
csharp/TestResults
105+
csharp/packages
106+
csharp/sbe-generated/baseline
107+
csharp/sbe-generated/baseline-bigendian
108+
csharp/sbe-generated/extension
109+
csharp/sbe-generated/issue435
110+
csharp/sbe-generated/since-deprecated
111+
csharp/sbe-generated/mktdata/*.cs
112+
csharp/sbe-generated/uk_co_real_logic_sbe_benchmarks_fix
113+
94114
# Mac
95115
.DS_Store

README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Simple Binary Encoding (SBE)
33

44
[SBE](https://github.com/FIXTradingCommunity/fix-simple-binary-encoding) is an OSI layer 6 presentation for
55
encoding and decoding binary application messages for low-latency financial applications. This repository contains
6-
the reference implementations in Java, C++, and Golang.
6+
the reference implementations in Java, C++, Golang, and Csharp.
77

88
Further details on the background and usage of SBE can be found on the
99
[Wiki](https://github.com/real-logic/simple-binary-encoding/wiki).
@@ -13,13 +13,15 @@ An XSD for SBE specs can be found
1313

1414
For the latest version information and changes see the [Change Log](https://github.com/real-logic/simple-binary-encoding/wiki/Change-Log) with **downloads** at [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Csbe).
1515

16-
This SBE implementation is designed with work very efficiently with the [Aeron](https://github.com/real-logic/Aeron)
17-
messaging system for low-latency and high-throughput communications. SBE has a dependency on [Agrona](https://github.com/real-logic/Agrona)
18-
for its buffer implementations.
16+
The Java and C++ SBE implementations are designed with work very efficiently with the
17+
[Aeron](https://github.com/real-logic/Aeron) messaging system for low-latency and
18+
high-throughput communications. The Java SBE implementation has a dependency on
19+
[Agrona](https://github.com/real-logic/Agrona) for its buffer implementations.
1920

2021
License (See LICENSE file for full license)
2122
-------------------------------------------
2223
Copyright 2014 - 2017 Real Logic Limited
24+
Copyright 2017 MarketFactory Inc
2325

2426
Licensed under the Apache License, Version 2.0 (the "License");
2527
you may not use this file except in compliance with the License.
@@ -85,7 +87,6 @@ Jars for the executable, source, and javadoc for the various modules can be foun
8587

8688
<module>/build/libs
8789

88-
8990
C++ Build using CMake
9091
---------------------
9192
NOTE: Linux, Mac OS, and Windows only for the moment. See
@@ -124,7 +125,25 @@ tests and containes some examples
124125
# make # test, examples, bench
125126

126127
Users of golang generated code should see the [user
127-
documentation](https://github.com/real-logic/simple-binary-encoding/wiki/Golang-User-Guide). Developers
128-
wishing to enhance the golang generator should see the [developer
128+
documentation](https://github.com/real-logic/simple-binary-encoding/wiki/Golang-User-Guide).
129+
130+
Developers wishing to enhance the golang generator should see the [developer
129131
documentation](https://github.com/real-logic/simple-binary-encoding/blob/master/gocode/README.md)
130132

133+
C# Build
134+
--------
135+
As of April 2017, the csharp build is considered a preview release. API stability is not yet guaranteed. User and Developer guides are not yet released or are incomplete.
136+
137+
First build using Gradle to generate the SBE jar and then use it to
138+
generate the C# code used for testing and the examples.
139+
140+
$ ./gradlew
141+
$ ./gradlew generateCsharpCodecs
142+
143+
You can then use the [Visual Studio 2017 Community solution](https://github.com/real-logic/simple-binary-encoding/blob/master/csharp/csharp.sln) to build and explore the
144+
example. This solution also builds some tests which can be run via the provided
145+
[runtests.sh](https://github.com/real-logic/simple-binary-encoding/blob/master/csharp/runtests.sh) script.
146+
147+
Users of csharp generated code should see the [user documentation (coming)](https://github.com/real-logic/simple-binary-encoding/wiki/Csharp-User-Guide).
148+
149+
Developers wishing to enhance the csharp generator should see the [developer documentation (coming)](https://github.com/real-logic/simple-binary-encoding/blob/master/csharp/README.md)

build.gradle

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ def projectPom = {
8282
8383
url = 'https://github.com/RichardWarburton'
8484
}
85+
developer {
86+
id = 'BillSegall'
87+
name = 'Bill Segall'
88+
89+
url = 'https://github.com/BillSegall'
90+
}
8591
}
8692
}
8793

@@ -500,7 +506,7 @@ task(generateGolangCodecsWithXSD, type:JavaExec) {
500506
'sbe-tool/src/test/resources/FixBinary.xml',
501507
'sbe-tool/src/test/resources/issue435.xml',
502508
'sbe-tool/src/test/resources/since-deprecated-test-schema.xml',
503-
'gocode/resources/example-bigendian.xml',
509+
'sbe-tool/src/test/resources/example-bigendian-test-schema.xml',
504510
'gocode/resources/example-composite.xml',
505511
'gocode/resources/example-extension-2-schema.xml',
506512
'gocode/resources/group-with-data-extension-schema.xml',
@@ -518,6 +524,24 @@ task generateGolangCodecs {
518524
'generateGolangCodecsWithXSD'
519525
}
520526

527+
task(generateCsharpCodecs, type:JavaExec) {
528+
main = 'uk.co.real_logic.sbe.SbeTool'
529+
classpath = project(':sbe-all').sourceSets.main.runtimeClasspath
530+
systemProperties(
531+
'sbe.output.dir': 'csharp/sbe-generated',
532+
'sbe.target.language': 'uk.co.real_logic.sbe.generation.csharp.Csharp',
533+
'sbe.validation.xsd': validationXsdPath)
534+
args = [
535+
'sbe-tool/src/test/resources/FixBinary.xml',
536+
'sbe-tool/src/test/resources/issue435.xml',
537+
'sbe-tool/src/test/resources/since-deprecated-test-schema.xml',
538+
'sbe-tool/src/test/resources/example-bigendian-test-schema.xml',
539+
'sbe-samples/src/main/resources/example-schema.xml',
540+
'sbe-samples/src/main/resources/example-extension-schema.xml',
541+
'sbe-benchmarks/src/main/resources/fix-message-samples.xml'
542+
]
543+
}
544+
521545
task(generateJavaIrCodecs, type: JavaExec) {
522546
main = 'uk.co.real_logic.sbe.SbeTool'
523547
classpath = project(':sbe-all').sourceSets.main.runtimeClasspath
622 KB
Binary file not shown.

0 commit comments

Comments
 (0)