From 43759790ae3feb3e05ab335759c6978f64198270 Mon Sep 17 00:00:00 2001 From: Dmitry Volodin Date: Fri, 2 Mar 2018 13:50:26 +0300 Subject: [PATCH] ARTEMIS-1723 Migrate AMQP C# examples to the common .NET version --- .gitignore | 2 ++ examples/common/prettify.css | 0 examples/common/prettify.js | 0 .../dotnet/DurableSubscriptions/Program.cs | 0 .../DurableSubscriptions/amqp-durables.csproj | 6 ++-- .../DurableSubscriptions/stop-broker.sh | 21 +++++++++++ .../amqp/dotnet/HelloWorld/HelloWorld.csproj | 31 ++++++++++++++++ .../amqp/dotnet/HelloWorld/Program.cs | 0 .../amqp/dotnet/HelloWorld/project.json | 36 ------------------- .../amqp/dotnet/HelloWorld/start-broker.sh | 2 +- .../amqp/dotnet/HelloWorld/stop-broker.sh | 21 +++++++++++ 11 files changed, 79 insertions(+), 40 deletions(-) mode change 100755 => 100644 examples/common/prettify.css mode change 100755 => 100644 examples/common/prettify.js mode change 100755 => 100644 examples/protocols/amqp/dotnet/DurableSubscriptions/Program.cs mode change 100755 => 100644 examples/protocols/amqp/dotnet/DurableSubscriptions/amqp-durables.csproj create mode 100755 examples/protocols/amqp/dotnet/DurableSubscriptions/stop-broker.sh create mode 100644 examples/protocols/amqp/dotnet/HelloWorld/HelloWorld.csproj mode change 100755 => 100644 examples/protocols/amqp/dotnet/HelloWorld/Program.cs delete mode 100755 examples/protocols/amqp/dotnet/HelloWorld/project.json create mode 100755 examples/protocols/amqp/dotnet/HelloWorld/stop-broker.sh diff --git a/.gitignore b/.gitignore index 3727d4590b..9d067b717e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ **/*.iml **/nb-configuration.xml **/target +**/bin +**/obj .idea/ ratReport.txt **/server.lock diff --git a/examples/common/prettify.css b/examples/common/prettify.css old mode 100755 new mode 100644 diff --git a/examples/common/prettify.js b/examples/common/prettify.js old mode 100755 new mode 100644 diff --git a/examples/protocols/amqp/dotnet/DurableSubscriptions/Program.cs b/examples/protocols/amqp/dotnet/DurableSubscriptions/Program.cs old mode 100755 new mode 100644 diff --git a/examples/protocols/amqp/dotnet/DurableSubscriptions/amqp-durables.csproj b/examples/protocols/amqp/dotnet/DurableSubscriptions/amqp-durables.csproj old mode 100755 new mode 100644 index f8c568b3e5..ce383a3aad --- a/examples/protocols/amqp/dotnet/DurableSubscriptions/amqp-durables.csproj +++ b/examples/protocols/amqp/dotnet/DurableSubscriptions/amqp-durables.csproj @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. --> - + Exe - netcoreapp1.1 + netcoreapp2.0 - + \ No newline at end of file diff --git a/examples/protocols/amqp/dotnet/DurableSubscriptions/stop-broker.sh b/examples/protocols/amqp/dotnet/DurableSubscriptions/stop-broker.sh new file mode 100755 index 0000000000..b224e61957 --- /dev/null +++ b/examples/protocols/amqp/dotnet/DurableSubscriptions/stop-broker.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# if you are using a source distribution you will have to stop the broker manually +# Use this as a reference! +./server1/bin/artemis-service stop diff --git a/examples/protocols/amqp/dotnet/HelloWorld/HelloWorld.csproj b/examples/protocols/amqp/dotnet/HelloWorld/HelloWorld.csproj new file mode 100644 index 0000000000..3a294f3f24 --- /dev/null +++ b/examples/protocols/amqp/dotnet/HelloWorld/HelloWorld.csproj @@ -0,0 +1,31 @@ + + + + + + netcoreapp2.0 + HelloWorld + Exe + HelloWorld + + + + + + + diff --git a/examples/protocols/amqp/dotnet/HelloWorld/Program.cs b/examples/protocols/amqp/dotnet/HelloWorld/Program.cs old mode 100755 new mode 100644 diff --git a/examples/protocols/amqp/dotnet/HelloWorld/project.json b/examples/protocols/amqp/dotnet/HelloWorld/project.json deleted file mode 100755 index 7df8f24dd8..0000000000 --- a/examples/protocols/amqp/dotnet/HelloWorld/project.json +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -{ - "version": "1.0.0-*", - "buildOptions": { - "debugType": "portable", - "emitEntryPoint": true - }, - "dependencies": {"AMQPNetLite": "1.2.2"}, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.1.0" - } - }, - "imports": "dnxcore50" - } - } -} diff --git a/examples/protocols/amqp/dotnet/HelloWorld/start-broker.sh b/examples/protocols/amqp/dotnet/HelloWorld/start-broker.sh index 1f193dac48..114592af07 100755 --- a/examples/protocols/amqp/dotnet/HelloWorld/start-broker.sh +++ b/examples/protocols/amqp/dotnet/HelloWorld/start-broker.sh @@ -18,5 +18,5 @@ # if you are using a source distribution you will have to create and start the broker manually # Use this as a reference! -../../../../bin/artemis create ./server1 --user a --password a --role a --allow-anonymous --force +../../../../../bin/artemis create ./server1 --user a --password a --role a --allow-anonymous --force ./server1/bin/artemis-service start diff --git a/examples/protocols/amqp/dotnet/HelloWorld/stop-broker.sh b/examples/protocols/amqp/dotnet/HelloWorld/stop-broker.sh new file mode 100755 index 0000000000..b224e61957 --- /dev/null +++ b/examples/protocols/amqp/dotnet/HelloWorld/stop-broker.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# if you are using a source distribution you will have to stop the broker manually +# Use this as a reference! +./server1/bin/artemis-service stop