added simplified nant build

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@383596 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-06 17:42:59 +00:00
parent 1ea5d94095
commit 77a9957a55
7 changed files with 569 additions and 701 deletions

View File

@ -0,0 +1,212 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{08321F42-4B3D-4815-B592-95962BAC3B9F}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>activemq-dotnet</RootNamespace>
<AssemblyName>activemq-dotnet</AssemblyName>
<WarningLevel>4</WarningLevel>
<StartupObject/>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework"/>
<Reference Include="System"/>
<Reference Include="System.Data"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets"/>
<ItemGroup>
<Compile Include="src\main\csharp\ActiveMQ\BrokerException.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\AbstractCommand.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQBytesMessage.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQDestination.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQMapMessage.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQMessage.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQObjectMessage.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQQueue.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQStreamMessage.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTempDestination.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTempQueue.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTempTopic.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTextMessage.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTopic.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BaseCommand.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BrokerError.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BrokerId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BrokerInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\Command.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ConnectionError.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ConnectionId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ConnectionInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ConsumerId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ConsumerInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ControlCommand.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\DataArrayResponse.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\DataResponse.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\DataStructure.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\DataStructureSupport.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\DestinationInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\DiscoveryEvent.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ExceptionResponse.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\FlushCommand.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\IntegerResponse.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\JournalQueueAck.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\JournalTopicAck.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\JournalTrace.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\JournalTransaction.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\KeepAliveInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\LocalTransactionId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\MarshallAware.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\Message.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\MessageAck.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\MessageDispatch.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\MessageDispatchNotification.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\MessageId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ProducerId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ProducerInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\RemoveInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\RemoveSubscriptionInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\Response.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\SessionId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\SessionInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ShutdownInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\SubscriptionInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\TransactionId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\TransactionInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\WireFormatInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\XATransactionId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Connection.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\ConnectionClosedException.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\ConnectionFactory.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\ConsumerClosedException.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\DestinationFilter.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Dispatcher.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\ISynchronization.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\MessageConsumer.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\MessageProducer.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\BaseDataStreamMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\BooleanStream.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\EndianSupport.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\MessagePropertyHelper.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\OpenWireBinaryReader.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\OpenWireBinaryWriter.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\OpenWireFormat.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\PrimitiveMap.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQBytesMessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQDestinationMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQMapMessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQMessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQObjectMessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQQueueMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQStreamMessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQTempDestinationMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQTempQueueMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQTempTopicMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQTextMessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ActiveMQTopicMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\BaseCommandMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\BrokerIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\BrokerInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ConnectionErrorMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ConnectionIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ConnectionInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ConsumerIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ConsumerInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ControlCommandMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\DataArrayResponseMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\DataResponseMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\DataStructureSupportMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\DestinationInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\DiscoveryEventMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ExceptionResponseMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\FlushCommandMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\IntegerResponseMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalQueueAckMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalTopicAckMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalTraceMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalTransactionMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\KeepAliveInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\LocalTransactionIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MarshallerFactory.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageAckMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageDispatchMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageDispatchNotificationMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ProducerIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ProducerInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\RemoveInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\RemoveSubscriptionInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ResponseMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\SessionIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\SessionInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ShutdownInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\SubscriptionInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\TransactionIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\TransactionInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\WireFormatInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\XATransactionIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Session.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\TransactionContext.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\FutureResponse.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\ITransport.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\ITransportFactory.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\LoggingTransport.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\MutexTransport.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\ResponseCorrelator.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\Tcp\TcpTransportFactory.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Transport\TransportFilter.cs"/>
<Compile Include="src\main\csharp\JMS\IBytesMessage.cs"/>
<Compile Include="src\main\csharp\JMS\IConnection.cs"/>
<Compile Include="src\main\csharp\JMS\IConnectionFactory.cs"/>
<Compile Include="src\main\csharp\JMS\IDestination.cs"/>
<Compile Include="src\main\csharp\JMS\IMapMessage.cs"/>
<Compile Include="src\main\csharp\JMS\IMessage.cs"/>
<Compile Include="src\main\csharp\JMS\IMessageConsumer.cs"/>
<Compile Include="src\main\csharp\JMS\IMessageProducer.cs"/>
<Compile Include="src\main\csharp\JMS\IPrimitiveMap.cs"/>
<Compile Include="src\main\csharp\JMS\IQueue.cs"/>
<Compile Include="src\main\csharp\JMS\ISession.cs"/>
<Compile Include="src\main\csharp\JMS\IStartable.cs"/>
<Compile Include="src\main\csharp\JMS\IStoppable.cs"/>
<Compile Include="src\main\csharp\JMS\ITemporaryQueue.cs"/>
<Compile Include="src\main\csharp\JMS\ITemporaryTopic.cs"/>
<Compile Include="src\main\csharp\JMS\ITextMessage.cs"/>
<Compile Include="src\main\csharp\JMS\ITopic.cs"/>
<Compile Include="src\main\csharp\JMS\JMSConnectionException.cs"/>
<Compile Include="src\main\csharp\JMS\JMSException.cs"/>
<Compile Include="src\test\csharp\ActiveMQ\Commands\CommandTest.cs"/>
<Compile Include="src\test\csharp\ActiveMQ\OpenWire\BooleanStreamTest.cs"/>
<Compile Include="src\test\csharp\ActiveMQ\OpenWire\EndianTest.cs"/>
<Compile Include="src\test\csharp\ActiveMQ\TestMain.cs"/>
<Compile Include="src\test\csharp\JMS\AsyncConsumeTest.cs"/>
<Compile Include="src\test\csharp\JMS\BadConsumeTest.cs"/>
<Compile Include="src\test\csharp\JMS\BytesMessageTest.cs"/>
<Compile Include="src\test\csharp\JMS\ConsumerTest.cs"/>
<Compile Include="src\test\csharp\JMS\JMSPropertyTest.cs"/>
<Compile Include="src\test\csharp\JMS\JMSTestSupport.cs"/>
<Compile Include="src\test\csharp\JMS\MapMessageTest.cs"/>
<Compile Include="src\test\csharp\JMS\MessageTest.cs"/>
<Compile Include="src\test\csharp\JMS\TextMessage.cs"/>
<Compile Include="src\test\csharp\JMS\TransactionTest.cs"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,18 @@
Microsoft Visual Studio Solution File, Format Version 9.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "activemq_dotnet", "activemq-dotnet.csproj", "{08321F42-4B3D-4815-B592-95962BAC3B9F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08321F42-4B3D-4815-B592-95962BAC3B9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08321F42-4B3D-4815-B592-95962BAC3B9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08321F42-4B3D-4815-B592-95962BAC3B9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08321F42-4B3D-4815-B592-95962BAC3B9F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,20 +1,16 @@
<?xml version="1.0" ?> <?xml version="1.0" ?>
<project name="openwire" default="test"> <project name="openwire" default="build">
<!-- set build.date property to current date in format yyyy-MM-dd --> <!-- set build.date property to current date in format yyyy-MM-dd -->
<tstamp property="build.date" pattern="yyyy-MM-dd" /> <tstamp property="build.date" pattern="yyyy-MM-dd" />
<!-- global project settings --> <!-- global project settings -->
<property name="project.name" value="openwire" /> <property name="project.name" value="activemq-dotnet"/>
<property name="project.version" value="4.0" unless="${property::exists('project.version')}" /> <property name="project.version" value="4.0" unless="${property::exists('project.version')}"/>
<property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" /> <!-- nightly / dev / alpha / beta# / rc# / release --> <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}"/>
<property name="project.version.full" value="${project.version + if(project.release.type == 'release', '', '-' + project.release.type)}" dynamic="true" />
<if test="${project.release.type == 'nightly'}"> <!--
<property name="project.version.full" value="${project.version + '-nightly-' + build.date}" />
</if>
<if test="${project.release.type != 'nightly'}">
<property name="project.version.full" value="${project.version + if(project.release.type == 'release', '', '-' + project.release.type)}" dynamic="true" />
</if>
<!--
specifies whether the CommonAssemblyInfo.cs file should be created. specifies whether the CommonAssemblyInfo.cs file should be created.
we do not want this for releases (whether they're beta or release) as we do not want this for releases (whether they're beta or release) as
this would cause the build number to be updated this would cause the build number to be updated
@ -28,359 +24,29 @@
<!-- default configuration --> <!-- default configuration -->
<property name="project.config" value="debug" /> <!-- debug|release --> <property name="project.config" value="debug" /> <!-- debug|release -->
<property name="console.name" value="OpenWire" /> <property name="build.defines" value="" />
<property name="build.defines" value="" /> <property name="build.number" value="${math::abs(math::floor(timespan::get-total-days(datetime::now() - datetime::parse('01/01/2000'))))}" />
<property name="build.number" value="${math::abs(math::floor(timespan::get-total-days(datetime::now() - datetime::parse('01/01/2000'))))}" />
<!-- platform specific properties. These are the defaults --> <!-- platform specific properties. These are the defaults -->
<property name="current.build.defines" value="${build.defines}" /> <property name="current.build.defines" value="${build.defines}" />
<fileset id="tas.msnet" basedir="src">
<include name="OpenWire.MSNet/OpenWire.MSNet.build" />
</fileset>
<fileset id="tas.msnet.tests" basedir="tests"> <!-- Named project configurations (used by self-test and self-doc tasks) -->
<include name="OpenWire.MSNet/OpenWire.MSNet.build" />
</fileset>
<fileset id="tas.win32" basedir="src">
<include name="OpenWire.Win32/OpenWire.Win32.build" />
<include name="OpenWire.VisualCpp/OpenWire.VisualCpp.build" />
<include name="OpenWire.VSNet/OpenWire.VSNet.build" />
</fileset>
<fileset id="tas.win32.tests" basedir="tests">
<include name="OpenWire.Win32/OpenWire.Win32.build" />
<include name="OpenWire.VisualCpp/OpenWire.VisualCpp.build" />
<include name="OpenWire.VSNet/OpenWire.VSNet.build" />
</fileset>
<fileset id="tas.core" basedir="src">
<include name="OpenWire.Resources/OpenWire.Resources.build" />
<include name="OpenWire.DotNet/OpenWire.DotNet.build" />
<include name="OpenWire.Compression/OpenWire.Compression.build" />
<include name="OpenWire.NUnit/OpenWire.NUnit.build" />
<include name="OpenWire.SourceControl/OpenWire.SourceControl.build" />
</fileset>
<fileset id="tas.core.tests" basedir="tests">
<include name="OpenWire.DotNet/OpenWire.DotNet.build" />
<include name="OpenWire.Compression/OpenWire.Compression.build" />
<include name="OpenWire.SourceControl/OpenWire.SourceControl.build" />
<!--
<include name="OpenWire.NUnit/OpenWire.NUnit.build" />
-->
</fileset>
<!-- named project configurations (used by self-test and self-doc tasks) -->
<target name="debug" description="Perform a 'debug' build"> <target name="debug" description="Perform a 'debug' build">
<property name="project.config" value="debug" /> <property name="project.config" value="debug" />
<property name="build.debug" value="true" /> <property name="build.debug" value="true" />
<property name="build.dir" value="${project::get-base-directory()}/build/${framework::get-target-framework()}.${platform::get-name()}/${project.name}-${project.version}-${project.config}" /> <property name="build.dir" value="${project::get-base-directory()}/build/${framework::get-target-framework()}.${platform::get-name()}/${project.name}-${project.version}-${project.config}" />
</target> </target>
<target name="release" description="Perform a 'release' build"> <target name="release" description="Perform a 'release' build">
<property name="project.config" value="release" /> <property name="project.config" value="release" />
<property name="build.debug" value="false" /> <property name="build.debug" value="false" />
<property name="build.dir" value="${project::get-base-directory()}/build/${project.name}-${project.version.full}" /> <property name="build.dir" value="${project::get-base-directory()}/build/${project.name}-${project.version.full}" />
</target> </target>
<!-- build tasks -->
<target name="init" description="Initializes build properties">
<call target="${project.config}" />
<call target="set-framework-configuration" />
</target>
<target name="create-common-assemblyinfo" if="${create.assemblyinfo}">
<!-- ensure src/CommonAssemblyInfo.cs is writable if it already exists -->
<attrib file="src/CommonAssemblyInfo.cs" readonly="false" if="${file::exists('src/CommonAssemblyInfo.cs')}" />
<!-- generate the source file holding the common assembly-level attributes -->
<asminfo output="src/CommonAssemblyInfo.cs" language="CSharp">
<imports>
<import namespace="System" />
<import namespace="System.Reflection" />
<import namespace="System.Runtime.InteropServices" />
</imports>
<attributes>
<attribute type="ComVisibleAttribute" value="false" />
<attribute type="CLSCompliantAttribute" value="true" />
<attribute type="AssemblyTitleAttribute" value="OpenWire" />
<attribute type="AssemblyDescriptionAttribute" value="A .NET Library for talking to ActiveMQ" />
<attribute type="AssemblyConfigurationAttribute" value="${project.release.type}" />
<attribute type="AssemblyCompanyAttribute" value="http://activemq.org/" />
<attribute type="AssemblyProductAttribute" value="OpenWire" />
<attribute type="AssemblyCopyrightAttribute" value="Copyright (C) 2005-${datetime::get-year(datetime::now())} Apache Software Foundation" />
<attribute type="AssemblyTrademarkAttribute" value="" />
<attribute type="AssemblyCultureAttribute" value="" />
<attribute type="AssemblyVersionAttribute" value="${project.version}.${build.number}.0" />
<attribute type="AssemblyInformationalVersionAttribute" value="${project.version}" />
</attributes>
</asminfo>
</target>
<target name="clean" depends="init" description="Deletes current build configuration">
<delete dir="${build.dir}" if="${directory::exists(build.dir)}" />
</target>
<target name="cleanall" description="Deletes every build configuration">
<echo message="Deleting all builds from all configurations" />
<delete dir="build" if="${directory::exists('build')}" />
</target>
<target name="build" depends="init, create-common-assemblyinfo" description="Builds current configuration">
<echo message="Build Directory is ${build.dir}" />
<!-- ensure bin directory exists -->
<mkdir dir="${build.dir}/bin" />
<!-- ensure lib directory exists -->
<mkdir dir="${build.dir}/bin/lib" />
<!-- copy third party executables -->
<copy todir="${build.dir}/bin">
<fileset basedir="bin">
<include name="scvs.exe" />
</fileset>
</copy>
<copy todir="${build.dir}/bin">
<fileset basedir="lib">
<!-- copy log4net assembly, workaround for Mono bug #57602 -->
<include name="log4net.dll" />
<!-- #ziplib command line client -->
<include name="scvs.exe" />
</fileset>
</copy>
<!-- copy third party assemblies -->
<copy todir="${build.dir}/bin/lib">
<fileset basedir="lib">
<include name="**/*" />
<exclude name="log4net.dll" />
<exclude name="scvs.exe" />
</fileset>
</copy>
<!-- build ActiveMQ assembly -->
<nant buildfile="src/ActiveMQ/OpenWire.Client.build" target="build" />
<!-- build task assemblies -->
<nant target="build">
<buildfiles refid="tas.core"/>
</nant>
<!-- build Microsoft.NET specific task assemblies if we are on win32 and targeting a .NET Framework -->
<nant target="build" if="${platform::is-win32() and framework::get-family(framework::get-target-framework()) == 'net'}">
<buildfiles refid="tas.msnet"/>
</nant>
<!-- build win32 specific task assemblies if we are on win32 -->
<nant target="build" if="${platform::is-win32()}">
<buildfiles refid="tas.win32" />
</nant>
</target>
<target name="test" depends="build">
<!-- build ActiveMQ Tests assembly -->
<nant buildfile="tests/ActiveMQ/OpenWire.Client.build" target="test" />
<!-- build tests for task assemblies -->
<nant target="build">
<buildfiles refid="tas.core.tests"/>
</nant>
<!-- build tests for Microsoft.NET specific extension assemblies if we are on win32 and targeting a .NET Framework -->
<nant target="build" if="${platform::is-win32() and framework::get-family(framework::get-target-framework()) == 'net'}">
<buildfiles refid="tas.msnet.tests"/>
</nant>
<nant target="build" if="${platform::is-win32()}">
<buildfiles refid="tas.win32.tests" />
</nant>
</target>
<target name="package-doc">
</target>
<target name="package-common" depends="build">
<!-- move config file -->
<move file="${build.dir}/bin/OpenWire.exe.config" tofile="${build.dir}/bin/${console.name}.exe.config" />
<!-- remove non-release files -->
<delete>
<fileset basedir="${build.dir}/bin">
<include name="OpenWire.Console.*" />
<!-- remove test assemblies -->
<include name="*.Tests.*" />
</fileset>
</delete>
<!-- copy project files -->
<copy todir="${build.dir}">
<fileset>
<include name="*" />
<include name="doc/**" />
<include name="src/**" />
<include name="tests/**" />
<include name="examples/**" />
<include name="schema/**" />
<!-- third party assemblies -->
<include name="lib/**" />
<!-- website -->
<include name="web/**" />
<!-- docs -->
<include name="doc/**" />
<!-- exclude static html pages as these will be filter-copied -->
<exclude name="doc/**/*.html" />
<!-- exclude nighlty build file -->
<exclude name="nightly.xml" />
<!-- exclude release build file -->
<exclude name="release.xml" />
<!--exclude VS.Net stuff -->
<exclude name="**/*.suo" />
<exclude name="**/*j.user" />
<exclude name="**/bin/**" />
<exclude name="**/obj/**" />
</fileset>
</copy>
<!-- filter-copy static html pages -->
<copy todir="${build.dir}" overwrite="true">
<fileset>
<include name="doc/**/*.html" />
</fileset>
<filterchain>
<replacetokens>
<token key="PRODUCT_VERSION" value="${project.version.full}" />
</replacetokens>
<!-- when NOT building a release package, add prelimary notice -->
<replacestring
from="&lt;!-- @PRELIMINARY_NOTICE@ -->"
to="&lt;p class=&quot;topicstatus&quot;>[This is preliminary documentation and subject to change.]&lt;/p>"
unless="${project.release.type == 'release'}"
/>
<!-- when building a release package, remove the placeholder -->
<replacestring
from="&lt;!-- @PRELIMINARY_NOTICE@ -->"
to=""
if="${project.release.type == 'release'}"
/>
</filterchain>
</copy>
<!-- determine the zip file prefix directory -->
<property name="project.zip.prefix" value="${project.name}-${project.version.full}" />
</target>
<target name="package-src" depends="package-common">
<!-- determine name of source zip distribution -->
<property name="project.zip-path.src" value="${project::get-base-directory()}/build/${project.name}-${project.version.full}-src.zip" />
<!-- remove package zip file if it already exists -->
<delete file="${project.zip-path.src}" if="${file::exists(project.zip-path.src)}" />
<!-- create package zip file -->
<zip zipfile="${project.zip-path.src}" ziplevel="9">
<fileset basedir="${build.dir}" prefix="${project.zip.prefix}">
<include name="Makefile" />
<include name="Makefile.nmake" />
<include name="OpenWire.build" />
<include name="OpenWire.sln" />
<include name="COPYING.txt" />
<include name="README.txt" />
<!-- third party assemblies -->
<include name="lib/**/*" />
<!-- license & release notes -->
<include name="doc/*" />
<!-- user manual (no SDK) -->
<include name="doc/help/**" />
<!-- examples -->
<include name="examples/**/*" />
<!-- sources -->
<include name="src/**/*" />
<!-- unit tests -->
<include name="tests/**/*" />
</fileset>
</zip>
<!-- determine name of source gzipped tar distribution -->
<property name="project.gzip-path.src" value="${project::get-base-directory()}/build/${project.name}-${project.version.full}-src.tar.gz" />
<!-- remove package gzip file if it already exists -->
<delete file="${project.gzip-path.src}" if="${file::exists(project.gzip-path.src)}" />
<!-- create package gzip file -->
<tar destfile="${project.gzip-path.src}" compression="GZip">
<fileset basedir="${build.dir}" prefix="${project.zip.prefix}">
<include name="Makefile" />
<include name="Makefile.nmake" />
<include name="OpenWire.build" />
<include name="OpenWire.sln" />
<include name="COPYING.txt" />
<include name="README.txt" />
<!-- third party assemblies -->
<include name="lib/**/*" />
<!-- license & release notes -->
<include name="doc/*" />
<!-- user manual (no SDK) -->
<include name="doc/help/**" />
<!-- examples -->
<include name="examples/**/*" />
<!-- sources -->
<include name="src/**/*" />
<!-- unit tests -->
<include name="tests/**/*" />
</fileset>
</tar>
<echo message="Created '${project.config}' source packages at file://${project::get-base-directory()}/build/" />
</target>
<target name="package-bin" depends="package-common">
<!-- determine name of binary zip distribution -->
<property name="project.zip-path.bin" value="${project::get-base-directory()}/build/${project.name}-${project.version.full}-bin.zip" />
<!-- remove package zip file if it already exists -->
<delete file="${project.zip-path.bin}" if="${file::exists(project.zip-path.bin)}" />
<!-- create package zip file -->
<zip zipfile="${project.zip-path.bin}" ziplevel="9">
<fileset basedir="${build.dir}" prefix="${project.zip.prefix}">
<include name="COPYING.txt" />
<include name="README.txt" />
<include name="bin/**/*" />
<!-- license & release notes -->
<include name="doc/*" />
<!-- user manual -->
<include name="doc/help/**" />
<!-- SDK (in HTML Help format) -->
<include name="doc/sdk/OpenWire-SDK.chm" />
<!-- examples -->
<include name="examples/**/*" />
<!-- XML Schema -->
<include name="schema/**/*" />
</fileset>
</zip>
<!-- determine name of binary gzipped tar distribution -->
<property name="project.gzip-path.bin" value="${project::get-base-directory()}/build/${project.name}-${project.version.full}-bin.tar.gz" />
<!-- remove package gzip file if it already exists -->
<delete file="${project.gzip-path.bin}" if="${file::exists(project.gzip-path.bin)}" />
<!-- create package gzip file -->
<tar destfile="${project.gzip-path.bin}" compression="GZip">
<fileset basedir="${build.dir}" prefix="${project.zip.prefix}">
<include name="COPYING.txt" />
<include name="README.txt" />
<include name="bin/**/*" />
<!-- license & release notes -->
<include name="doc/*" />
<!-- user manual -->
<include name="doc/help/**" />
<!-- SDK (in plain HTML format) -->
<include name="doc/sdk/*" />
<exclude name="doc/sdk/OpenWire-SDK.chm" />
<!-- examples -->
<include name="examples/**/*" />
<!-- XML Schema -->
<include name="schema/**/*" />
</fileset>
</tar>
<echo message="Created '${project.config}' binary packages at file://${project.zip-path.bin}" />
</target>
<target name="package" depends="package-doc, package-src, package-bin" description="Creates a binary and source distribution package." />
<!-- Copies files to the bin folder. -->
<target name="UpdateBin" depends="build" description="Does a release build and copies them to the bin folder.">
<delete if="false">
<fileset basedir="bin">
<include name="OpenWire*" />
<exclude name="${console.name}.exe" />
</fileset>
</delete>
<copy todir="bin" overwrite="true">
<fileset basedir="${build.dir}/bin/">
<include name="OpenWire*" />
<exclude name="*Test*" />
<exclude name="${console.name}.xml" />
<exclude name="${console.name}.exe" />
</fileset>
</copy>
</target>
<!-- Framework support targets --> <!-- Framework support targets -->
<target name="set-framework-configuration"> <target name="set-framework-configuration">
<if test="${not(target::exists('set-'+framework::get-target-framework()+'-framework-configuration'))}"> <if test="${not(target::exists('set-'+framework::get-target-framework()+'-framework-configuration'))}">
<fail message="The '${framework::get-target-framework()}' framework is not supported by this version of OpenWire." /> <fail message="The '${framework::get-target-framework()}' framework is not supported by this version of ActiveMQ .NET" />
</if> </if>
<call target="set-${framework::get-target-framework()}-framework-configuration" /> <call target="set-${framework::get-target-framework()}-framework-configuration" />
</target> </target>
@ -426,74 +92,143 @@
<property name="link.sdkdoc.version" value="SDK_v1_0" /> <property name="link.sdkdoc.version" value="SDK_v1_0" />
<property name="link.sdkdoc.web" value="true" /> <property name="link.sdkdoc.web" value="true" />
</target> </target>
<!-- build tasks -->
<target name="init" description="Initializes build properties">
<call target="${project.config}" />
<call target="set-framework-configuration" />
</target>
<!-- install targets --> <!-- cleans the build -->
<target name="clean" depends="init" description="Deletes build">
<target name="install" depends="install-windows, install-linux" /> <delete dir="build" if="${directory::exists('build')}" />
</target>
<!--depends="userdoc" -->
<target name="install-windows" depends="build" if="${platform::is-win32()}"> <target name="create-common-assemblyinfo" if="${create.assemblyinfo}" depends="init" description="Generate CommonAssemblyInfo.cs">
<!-- install to program files directory by default -->
<property name="install.realprefix" value="${environment::get-folder-path('ProgramFiles')}" />
<if test="${property::exists('install.prefix') and string::get-length(install.prefix) != 0}">
<property name="install.realprefix" value="${install.prefix}" />
</if>
<property name="install.copylocation" value="${path::combine(install.realprefix, 'OpenWire')}"/>
<echo message="Installing OpenWire to '${install.copylocation}' ..." />
<copy todir="${install.copylocation}" overwrite="true"> <!-- ensure src/main/csharp/CommonAssemblyInfo.cs is writable if it already exists -->
<fileset basedir="${build.dir}"> <attrib file="src/main/csharp/CommonAssemblyInfo.cs" readonly="false" if="${file::exists('src/main/csharp/CommonAssemblyInfo.cs')}" />
<include name="bin/**/*" />
<include name="doc/**/*" /> <!-- generate the source file holding the common assembly-level attributes -->
<asminfo output="src/main/csharp/CommonAssemblyInfo.cs" language="CSharp">
<exclude name="bin/nant.tests.config" /> <imports>
<exclude name="bin/*.Tests.*" /> <import namespace="System" />
</fileset> <import namespace="System.Reflection" />
</copy> <import namespace="System.Runtime.InteropServices" />
</target> </imports>
<attributes>
<target name="install-linux" depends="build" if="${platform::is-unix()}"> <attribute type="ComVisibleAttribute" value="false" />
<property name="install.realprefix" value="/usr/local" /> <attribute type="CLSCompliantAttribute" value="false" />
<if test="${property::exists('install.prefix') and string::get-length(install.prefix) != 0}"> <attribute type="AssemblyTitleAttribute" value="ActiveMQ .NET" />
<property name="install.realprefix" value="${install.prefix}" /> <attribute type="AssemblyDescriptionAttribute" value="A .NET Library for talking to ActiveMQ" />
</if> <attribute type="AssemblyConfigurationAttribute" value="${project.release.type}" />
<property name="install.bindir" value="${path::combine(install.realprefix, 'bin')}"/> <attribute type="AssemblyCompanyAttribute" value="http://activemq.org/" />
<property name="install.share" value="${path::combine(install.realprefix, 'share')}"/> <attribute type="AssemblyProductAttribute" value="ActiveMQ" />
<property name="install.copylocation" value="${path::combine (install.share, 'OpenWire')}"/> <attribute type="AssemblyCopyrightAttribute" value="Copyright (C) 2005-${datetime::get-year(datetime::now())} Apache Software Foundation" />
<property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}"/> <attribute type="AssemblyTrademarkAttribute" value="" />
<echo message="Installing OpenWire to '${install.copylocation}' ..." /> <attribute type="AssemblyCultureAttribute" value="" />
<attribute type="AssemblyVersionAttribute" value="${project.version}.${build.number}.0" />
<attribute type="AssemblyInformationalVersionAttribute" value="${project.version}" />
</attributes>
</asminfo>
<!-- ensure src/test/csharp/CommonAssemblyInfo.cs is writable if it already exists -->
<attrib file="src/test/csharp/CommonAssemblyInfo.cs" readonly="false" if="${file::exists('src/test/csharp/CommonAssemblyInfo.cs')}" />
<!-- generate the source file holding the common assembly-level attributes -->
<asminfo output="src/test/csharp/CommonAssemblyInfo.cs" language="CSharp">
<imports>
<import namespace="System" />
<import namespace="System.Reflection" />
<import namespace="System.Runtime.InteropServices" />
</imports>
<attributes>
<attribute type="ComVisibleAttribute" value="false" />
<attribute type="CLSCompliantAttribute" value="false" />
<attribute type="AssemblyTitleAttribute" value="ActiveMQ .NET Test" />
<attribute type="AssemblyDescriptionAttribute" value="A .NET Library for testing the ActiveMQ .NET Library" />
<attribute type="AssemblyConfigurationAttribute" value="${project.release.type}" />
<attribute type="AssemblyCompanyAttribute" value="http://activemq.org/" />
<attribute type="AssemblyProductAttribute" value="ActiveMQ" />
<attribute type="AssemblyCopyrightAttribute" value="Copyright (C) 2005-${datetime::get-year(datetime::now())} Apache Software Foundation" />
<attribute type="AssemblyTrademarkAttribute" value="" />
<attribute type="AssemblyCultureAttribute" value="" />
<attribute type="AssemblyVersionAttribute" value="${project.version}.${build.number}.0" />
<attribute type="AssemblyInformationalVersionAttribute" value="${project.version}" />
</attributes>
</asminfo>
<copy todir="${install.copylocation}" overwrite="true">
<fileset basedir="${build.dir}">
<include name="bin/**/*" />
<include name="doc/**/*" />
<exclude name="bin/nant.tests.config" />
<exclude name="bin/*.Tests.*" />
</fileset>
</copy>
<echo message="Installing OpenWire wrapper script to '${install.bindir}' ..." />
<!-- store filename of wrapper script in property -->
<property name="wrapper" value="${path::combine(install.bindir, 'nant')}" />
<!--
create wrapper file using separate echo tasks for each line to ensure
the line endings of the generated file match the platform on which
the wrapper is created
-->
<echo file="${wrapper}" append="false">#!/bin/sh</echo>
<echo file="${wrapper}" append="true">exec ${path::combine(prefix, 'bin')}/mono ${path::combine(install.copylocation, 'bin')}/OpenWire.exe "$@"</echo>
<exec program="chmod" commandline="a+x ${path::combine(install.bindir, 'nant')}"/>
</target> </target>
<target name="rpm" depends="init, build"> <!-- Compile the main sources -->
<echo message="Build dir: ${build.dir}"/> <target name="build-main" depends="create-common-assemblyinfo">
<copy todir="${build.dir}">
<fileset> <echo message="Build Directory is ${build.dir}" />
<include name="OpenWire.spec" /> <mkdir dir="${build.dir}/bin" />
</fileset>
</copy>
<nant buildfile="release.xml" target="prepare-rpm"/> <csc target="library" define="${current.build.defines}" warnaserror="false" debug="${build.debug}" output="${build.dir}/bin/${project.name}.dll" doc="${build.dir}/bin/${project.name}.xml">
<nant buildfile="release.xml" target="binary-rpm"/> <nowarn>
<!-- do not report warnings for missing XML comments -->
<warning number="1591" />
<!-- do not report deprecation warnings -->
<warning number="0618" />
</nowarn>
<sources failonempty="true">
<include name="src/main/csharp/**/*.cs" />
<include name="src/main/csharp/CommonAssemblyInfo.cs" />
</sources>
<resources basedir="src/main/resources">
<include name="**/*"/>
</resources>
<!--
<references>
<include name="${build.dir}/bin/log4net.dll"/>
<include name="System.Web.dll"/>
</references>
-->
</csc>
</target> </target>
<target name="build-test" depends="create-common-assemblyinfo, build-main">
<csc target="library" define="${current.build.defines}" warnaserror="false" debug="${build.debug}" output="${build.dir}/bin/${project.name}.test.dll">
<nowarn>
<!-- do not report warnings for missing XML comments -->
<warning number="1591" />
<!-- do not report deprecation warnings -->
<warning number="0618" />
</nowarn>
<sources failonempty="true">
<include name="src/test/csharp/**/*.cs" />
<include name="src/test/csharp/CommonAssemblyInfo.cs" />
</sources>
<resources basedir="src/test/resources">
<include name="**/*"/>
</resources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="nunit.framework.dll" />
<include name="${build.dir}/bin/${project.name}.dll" />
</references>
<!--
<resources failonempty="false" basedir="Resources"
dynamicprefix="true" prefix="XML:">
<include name="**/*.xml" />
</resources>
-->
</csc>
</target>
<target name="build" depends="build-test">
</target>
<target name="test" depends="build-test">
<nunit2>
<formatter type="Plain" />
<test assemblyname="${build.dir}/bin/${project.name}.test.dll">
</test>
</nunit2>
</target>
</project> </project>

View File

@ -1,194 +1,194 @@
/* /*
* Copyright 2006 The Apache Software Foundation or its licensors, as * Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable. * applicable.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
using ActiveMQ.Commands; using ActiveMQ.Commands;
using System; using System;
using System.Collections; using System.Collections;
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace ActiveMQ.OpenWire namespace ActiveMQ.OpenWire
{ {
/// <summary> /// <summary>
/// A BinaryWriter that switches the endian orientation of the write opperations so that they /// A BinaryWriter that switches the endian orientation of the write opperations so that they
/// are compatible with marshalling used by OpenWire. /// are compatible with marshalling used by OpenWire.
/// </summary> /// </summary>
public class OpenWireBinaryWriter : BinaryWriter public class OpenWireBinaryWriter : BinaryWriter
{ {
public OpenWireBinaryWriter(Stream output) : base(output) public OpenWireBinaryWriter(Stream output) : base(output)
{ {
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="value">A long</param> /// <param name="value">A long</param>
public override void Write(long value) public override void Write(long value)
{ {
base.Write(EndianSupport.SwitchEndian(value)); base.Write(EndianSupport.SwitchEndian(value));
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="value">An ushort</param> /// <param name="value">An ushort</param>
public override void Write(ushort value) public override void Write(ushort value)
{ {
base.Write(EndianSupport.SwitchEndian(value)); base.Write(EndianSupport.SwitchEndian(value));
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="value">An int</param> /// <param name="value">An int</param>
public override void Write(int value) public override void Write(int value)
{ {
int x = EndianSupport.SwitchEndian(value); int x = EndianSupport.SwitchEndian(value);
base.Write(x); base.Write(x);
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="chars">A char[]</param> /// <param name="chars">A char[]</param>
/// <param name="index">An int</param> /// <param name="index">An int</param>
/// <param name="count">An int</param> /// <param name="count">An int</param>
public override void Write(char[] chars, int index, int count) public override void Write(char[] chars, int index, int count)
{ {
char[] t = new char[count]; char[] t = new char[count];
for( int i=0; i < count; i++ ) { for( int i=0; i < count; i++ ) {
t[index+i] = EndianSupport.SwitchEndian(t[index+i]); t[index+i] = EndianSupport.SwitchEndian(t[index+i]);
} }
base.Write(t); base.Write(t);
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="chars">A char[]</param> /// <param name="chars">A char[]</param>
public override void Write(char[] chars) public override void Write(char[] chars)
{ {
Write(chars, 0, chars.Length); Write(chars, 0, chars.Length);
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="value">An uint</param> /// <param name="value">An uint</param>
public override void Write(uint value) public override void Write(uint value)
{ {
base.Write(EndianSupport.SwitchEndian(value)); base.Write(EndianSupport.SwitchEndian(value));
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="ch">A char</param> /// <param name="ch">A char</param>
public override void Write(char ch) public override void Write(char ch)
{ {
base.Write(EndianSupport.SwitchEndian(ch)); base.Write(EndianSupport.SwitchEndian(ch));
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="value">An ulong</param> /// <param name="value">An ulong</param>
public override void Write(ulong value) public override void Write(ulong value)
{ {
base.Write(EndianSupport.SwitchEndian(value)); base.Write(EndianSupport.SwitchEndian(value));
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="value">A short</param> /// <param name="value">A short</param>
public override void Write(short value) public override void Write(short value)
{ {
base.Write(EndianSupport.SwitchEndian(value)); base.Write(EndianSupport.SwitchEndian(value));
} }
/// <summary> /// <summary>
/// Method Write /// Method Write
/// </summary> /// </summary>
/// <param name="value">A string</param> /// <param name="text">A string</param>
public override void Write(String text) public override void Write(String text)
{ {
if (text != null) if (text != null)
{ {
if( text.Length > short.MaxValue ) { if( text.Length > short.MaxValue ) {
throw new IOException("Cannot marshall string longer than: "+short.MaxValue+" characters, supplied steing was: "+text.Length+" characters"); throw new IOException("Cannot marshall string longer than: "+short.MaxValue+" characters, supplied steing was: "+text.Length+" characters");
} }
short strlen = (short)text.Length; short strlen = (short)text.Length;
short utflen = 0; short utflen = 0;
int c, count = 0; int c, count = 0;
char[] charr = text.ToCharArray(); char[] charr = text.ToCharArray();
for (int i = 0; i < strlen; i++) for (int i = 0; i < strlen; i++)
{ {
c = charr[i]; c = charr[i];
if ((c >= 0x0001) && (c <= 0x007F)) if ((c >= 0x0001) && (c <= 0x007F))
{ {
utflen++; utflen++;
} }
else if (c > 0x07FF) else if (c > 0x07FF)
{ {
utflen += 3; utflen += 3;
} }
else else
{ {
utflen += 2; utflen += 2;
} }
} }
Write(utflen); Write(utflen);
byte[] bytearr = new byte[utflen]; byte[] bytearr = new byte[utflen];
for (int i = 0; i < strlen; i++) for (int i = 0; i < strlen; i++)
{ {
c = charr[i]; c = charr[i];
if ((c >= 0x0001) && (c <= 0x007F)) if ((c >= 0x0001) && (c <= 0x007F))
{ {
bytearr[count++] = (byte) c; bytearr[count++] = (byte) c;
} }
else if (c > 0x07FF) else if (c > 0x07FF)
{ {
bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F)); bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
bytearr[count++] = (byte) (0x80 | ((c >> 6) & 0x3F)); bytearr[count++] = (byte) (0x80 | ((c >> 6) & 0x3F));
bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F)); bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F));
} }
else else
{ {
bytearr[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F)); bytearr[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F));
bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F)); bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F));
} }
} }
Write(bytearr); Write(bytearr);
} }
else else
{ {
Write((short)-1); Write((short)-1);
} }
} }
} }
} }

View File

@ -1,18 +0,0 @@
using System;
namespace org.apache.activemq
{
/// <summary>
/// Sample Maven Dotnet App
/// </summary>
public class App
{
/// <summary>
/// A public call on the library...
/// </summary>
public void doSomething()
{
Console.WriteLine("Hello World");
}
}
}

View File

@ -1,58 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

View File

@ -1,21 +0,0 @@
using System;
using NUnit.Framework;
namespace org.apache.activemq
{
/// <summary>
/// A very simple example of a dotnet test.
/// </summary>
[TestFixture] public class AppTest
{
[Test] public void doTest()
{
Assert.AreEqual(true, true);
Console.WriteLine("Who said Java and dotnet don\'t mix? :-)");
}
}
}