https://issues.apache.org/jira/browse/AMQNET-454
https://issues.apache.org/jira/secure/attachment/12620270/Apache.NMS.AMQP-add-topic-05.patch
diff --git a/src/main/csharp/Session.cs b/src/main/csharp/Session.cs
index 1781880..0a071e1 100644
--- a/src/main/csharp/Session.cs
+++ b/src/main/csharp/Session.cs
@@ -379,7 +379,7 @@
public ITopic GetTopic(string name)
{
- throw new NotSupportedException("TODO: Topic");
+ return new Topic(name);
}
public ITemporaryQueue CreateTemporaryQueue()
diff --git a/src/main/csharp/Topic.cs b/src/main/csharp/Topic.cs
new file mode 100644
index 0000000..665edd3
--- /dev/null
+++ b/src/main/csharp/Topic.cs
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+using System;
+
+namespace Apache.NMS.Amqp
+{
+
+ /// <summary>
+ /// Summary description for Topic.
+ /// </summary>
+ public class Topic : Destination, ITopic
+ {
+
+ public Topic()
+ : base()
+ {
+ }
+
+ public Topic(String name)
+ : base(name)
+ {
+ }
+
+ override public DestinationType DestinationType
+ {
+ get
+ {
+ return DestinationType.Topic;
+ }
+ }
+
+ public String TopicName
+ {
+ get { return Path; }
+ }
+
+
+ public override Destination CreateDestination(String name)
+ {
+ return new Topic(name);
+ }
+
+
+ }
+}
+
diff --git a/vs2010-amqp.csproj b/vs2010-amqp.csproj
index dd17ba6..c333985 100644
--- a/vs2010-amqp.csproj
+++ b/vs2010-amqp.csproj
@@ -90,8 +90,10 @@
<Compile Include="src\main\csharp\ObjectMessage.cs" />
<Compile Include="src\main\csharp\Queue.cs" />
<Compile Include="src\main\csharp\Session.cs" />
+ <Compile Include="src\main\csharp\SessionClosedException.cs" />
<Compile Include="src\main\csharp\StreamMessage.cs" />
<Compile Include="src\main\csharp\TextMessage.cs" />
+ <Compile Include="src\main\csharp\Topic.cs" />
</ItemGroup>
<ItemGroup>
<None Include="keyfile\NMSKey.snk" />