Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
//
// AssemblyInfo.cs
//
// Author:
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2003 Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Resources;
using System.Security;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the System.Messaging assembly
[assembly: AssemblyTitle ("Mono.Messaging.dll")]
[assembly: AssemblyDescription ("Mono.Messaging.dll")]
[assembly: AssemblyDefaultAlias ("Mono.Messaging.dll")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: ComVisible (false)]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../mono.pub")]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]

View File

@@ -0,0 +1,3 @@
2008-09-29 Michael Barker <mike@middlesoft.co.uk>
* AssemblyInfo.cs: New

View File

@@ -0,0 +1,33 @@
2009-07-18 Michael Barker <mike@middlesoft.co.uk>
* AssemblyInfo.cs: Switched to mono.pub for assembly signing.
* Makefile: Added conditional compiliation to support
System.Configuration for NET_2_0 profile.
2009-06-11 Michael Barker <mike@middlesoft.co.uk>
* Mono.Messaging_test.dll.sources: Moved MessageBaseTest.cs and
MessageEnumeratorTest.cs to Mono.Messaging.RabbitMQ.Test.
2009-05-23 Michael Barker <mike@middlesoft.co.uk>
* Mono.Messaging_test.dll.sources: Added MessageEnumeratorExceptionTest.cs
* Makefile: Added nunit-mocks.dll to build
2008-12-30 Raja R Harinath <harinath@hurrynot.org>
* Makefile (TEST_MCS_FLAGS): Reference System.Messaging.dll.
2008-12-24 Michael Barker <mike@middlesoft.co.uk>
* Mono.Messaging.dll.sources, added delegate
type definitions, MessageQueueBase.cs and event
argument definitions.
2008-09-29 Michael Barker <mike@middlesoft.co.uk>
* Assembly: New
* Test: New
* Makefile: New
* Mono.Messaging.dll.sources: New
* Mono.Messaging_test.dll.sources: New

View File

@@ -0,0 +1,15 @@
thisdir = class/Mono.Messaging
SUBDIRS =
include ../../build/rules.make
LIBRARY = Mono.Messaging.dll
ifeq (1, $(FRAMEWORK_VERSION_MAJOR))
LIB_MCS_FLAGS = /r:System.dll
else
LIB_MCS_FLAGS = /r:System.dll /r:System.Configuration
endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 /r:System.Messaging.dll /r:nunit.mocks.dll
include ../../build/library.make

View File

@@ -0,0 +1,28 @@
./Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
../../build/common/Locale.cs
./Mono.Messaging/AcknowledgeTypes.cs
./Mono.Messaging/Acknowledgment.cs
./Mono.Messaging/CompletedEventArgs.cs
./Mono.Messaging/CompletedEventHandler.cs
./Mono.Messaging/ConcurrentLinkedQueue.cs
./Mono.Messaging/ConnectionException.cs
./Mono.Messaging/CryptographicProviderType.cs
./Mono.Messaging/EncryptionAlgorithm.cs
./Mono.Messaging/EncryptionRequired.cs
./Mono.Messaging/HashAlgorithm.cs
./Mono.Messaging/IMessagingProvider.cs
./Mono.Messaging/IMessageEnumerator.cs
./Mono.Messaging/IMessageQueueTransaction.cs
./Mono.Messaging/IMessageQueue.cs
./Mono.Messaging/IMessage.cs
./Mono.Messaging/MessageBase.cs
./Mono.Messaging/MessagePriority.cs
./Mono.Messaging/MessageQueueBase.cs
./Mono.Messaging/MessageQueueTransactionStatus.cs
./Mono.Messaging/MessageQueueTransactionType.cs
./Mono.Messaging/MessageType.cs
./Mono.Messaging/MessageUnavailableException.cs
./Mono.Messaging/MessagingProviderLocator.cs
./Mono.Messaging/MonoMessagingException.cs
./Mono.Messaging/QueueReference.cs

View File

@@ -0,0 +1,47 @@
//
// Mono.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) 2003 Peter Van Isacker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging
{
[Flags]
[Serializable]
public enum AcknowledgeTypes
{
FullReachQueue = 5,
FullReceive = 14,
NegativeReceive = 8,
None = 0,
NotAcknowledgeReachQueue = 4,
NotAcknowledgeReceive = 12,
PositiveArrival = 1,
PositiveReceive = 2
}
}

View File

@@ -0,0 +1,55 @@
//
// Mono.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging
{
[Serializable]
public enum Acknowledgment
{
AccessDenied = 32772,
BadDestinationQueue = 32768,
BadEncryption = 32775,
BadSignature = 32774,
CouldNotEncrypt = 32776,
HopCountExceeded = 32773,
None = 0,
NotTransactionalMessage = 32778,
NotTransactionalQueue = 32777,
Purged = 32769,
QueueDeleted = 49152,
QueueExceedMaximumSize = 32771,
QueuePurged = 49153,
ReachQueue = 2,
ReachQueueTimeout = 32770,
Receive = 16384,
ReceiveTimeout = 49154
}
}

View File

@@ -0,0 +1,112 @@
2010-02-06 Michael Barker <mike@middlesoft.co.uk>
* ConnectionException.cs: Added additional text to aid debugging.
2009-07-20 Michael Barker <mike@middlesoft.co.uk>
* MessagingProviderLocator.cs: Changed System.Exceptions to
MonoMessagingExceptions.
2009-07-20 Michael Barker <mike@middlesoft.co.uk>
* MessagingProviderLocator.cs: Default to rabbitmq if no
MONO_MESSAGING_PROVIDER variable is defined.
2009-07-18 Michael Barker <mike@middlesoft.co.uk>
* MessagingProviderLocator.cs: Changed to cleanly support loading of
Provider classes from the GAC.
2009-07-14 Michael Barker <mike@middlesoft.co.uk>
* MessagingProviderLocator.cs: Added support for a rabbitmq alias that
mean the full classname is not required.
2009-07-11 Michael Barker <mike@middlesoft.co.uk>
* MessagingProviderLocator.cs: Removed unessecary fields, made fields
readonly and some formatting changes.
2009-05-23 Michael Barker <mike@middlesoft.co.uk>
* IMessageEnumerator.cs: Added additional methods to support operations
specified by the System.Messaging version.
2009-05-19 Michael Barker <mike@middlesoft.co.uk>
* IMessage.cs: Added additional comments.
* IMessagingProvider.cs: Added additional comments.
* MessagingProviderLocator.cs: Added support for specifing messaging
implementation using an environment variable.
2009-01-03 Michael Barker <mike@middlesoft.co.uk>
* MessageQueueBase.cs: Added support for handling exception asynchronously.
2008-12-21 Michael Barker <mike@middlesoft.co.uk>
* MessageQueueBase.cs: Added optional base class that provide async
messaging support.
* CompletedEventArgs.cs: Added for events on async methods.
* CompletedEventHandler.cs: Added for events on async methods.
* IMessageQueue.cs: Added method and event signatures for async messaging.
* MessagingProviderLocator.cs: Added constant for InfiniteTimeout.
* QueueReference.cs: Remove unecessary logging.
2008-12-07 Michael Barker <mike@middlesoft.co.uk>
* MessageUnavailableException.cs: Specific exception for messages not being
available on the queue.
* QueueReference.cs: Change queue name to return "private$" as required.
2008-11-23 Michael Barker <mike@middlesoft.co.uk>
* IMessageQueue.cs: Added support for MessageQueueTransactionType,
ReceiveBy{Id,CorrelationId} and PeekBy{Id,CorrelationId} methods.
2008-11-09 Michael Barker <mike@middlesoft.co.uk>
* MessageQueueTransactionType.cs: New, copy of
System.Messaging.MessageQueueTransactionStatus.cs
2008-11-02 Michael Barker <mike@middlesoft.co.uk>
* IMessageQueueTransaction.cs: New, interface for supporting transactions
* MessageQueueTransactionStatus.cs: New, straight copy of the class from
System.Messaging
* IMessageQueue.cs: Added methods for transactional delivery and purging
queues.
* IMessageQueueProvider.cs: Added method for creating transactions and
deleting queues.
2008-10-26 Michael Barker <mike@middlesoft.co.uk>
* ConnectionException.cs: Added support for InnerExceptions
* MessageBase.cs: Added check for delivered messages and throwing exceptions
for appropriate properties. Add null argument checks for some byte[]
properties.
* IMessage.cs: Added SentTime to the list of delivery properties.
2008-10-12 Michael Barker <mike@middlesoft.co.uk>
* IMessageEnumerator.cs: New
2008-09-29 Michael Barker <mike@middlesoft.co.uk>
* AcknowledgeTypes.cs: New
* Acknowledgment.cs: New
* ConnectionException.cs: New
* CryptographicProviderType.cs: New
* EncryptionAlgorithm.cs: New
* EncryptionRequired.cs: New
* HashAlgorithm.cs: New
* IMessage.cs: New
* IMessageQueue.cs: New
* IMessagingProvider.cs: New
* MessageBase.cs: New
* MessagePriority.cs: New
* MessageType.cs: New
* MessagingProviderLocator.cs: New
* MonoMessagingException.cs: New
* QueueReference.cs: New

View File

@@ -0,0 +1,50 @@
//
// Mono.Messaging
//
// Authors:
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2008 Michael Barker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging
{
public class CompletedEventArgs : EventArgs
{
private IAsyncResult _result;
public CompletedEventArgs(IAsyncResult result)
{
_result = result;
}
public IAsyncResult AsyncResult
{
get { return _result; }
set { _result = value; }
}
}
}

View File

@@ -0,0 +1,13 @@
// CompletedEventHandler.cs created with MonoDevelop
// User: mike at 8:16 p 21/12/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
namespace Mono.Messaging
{
[Serializable]
public delegate void CompletedEventHandler(object sender, CompletedEventArgs e);
}

View File

@@ -0,0 +1,127 @@
//
// Mono.Messaging
//
// Authors:
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2008 Michael Barker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Threading;
namespace Mono.Messaging {
public class ConcurrentLinkedQueue<T>
{
private Node<T> head;
private Node<T> tail;
public ConcurrentLinkedQueue ()
{
Node<T> node = new Node<T> (default (T));
head = node;
tail = node;
}
public void Enqueue (T context)
{
Console.WriteLine ("Insert: " + context);
Node<T> newNode = new Node<T>(context);
while (true) {
Node<T> tail = this.tail;
Node<T> next = tail.Next;
if (tail == this.tail) {
if (null == next) {
if (tail.CAS (newNode, next))
break;
} else {
Interlocked.CompareExchange<Node<T>> (ref this.tail, next, tail);
}
}
}
}
public T Dequeue ()
{
while (true) {
Node<T> head = this.head;
Node<T> tail = this.tail;
Node<T> next = head.Next;
if (head == this.head) {
if (head == tail) {
if (null == next)
return default(T);
Interlocked.CompareExchange<Node<T>> (ref this.tail, next, tail);
} else {
T t = next.Value;
if (Interlocked.CompareExchange(ref this.head, next, head) == head)
return t;
}
}
}
}
public override String ToString ()
{
return "Head: " + head;
}
internal class Node<N>
{
private readonly N context;
private Node<N> next = null;
public Node (N context)
{
this.context = context;
}
public Node<N> Next {
get { return next; }
}
public N Value {
get { return context; }
}
public bool CAS (Node<N> newNode, Node<N> oldNode)
{
return Interlocked.CompareExchange (ref next, newNode, oldNode) == oldNode;
}
public override String ToString ()
{
return "context: " + context + ", Next: " + next;
}
}
}
}

View File

@@ -0,0 +1,54 @@
//
// Mono.Messaging
//
// Authors:
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2008 Michael Barker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging {
public class ConnectionException : MonoMessagingException {
private readonly QueueReference qRef;
public ConnectionException (QueueReference qRef, Exception e)
: base ("Unable to connect to Queue: " + qRef + ", Error: " + e.Message, e)
{
this.qRef = qRef;
}
public ConnectionException (QueueReference qRef)
: base ("Unable to connect to Queue: " + qRef)
{
this.qRef = qRef;
}
public QueueReference QRef {
get { return qRef; }
}
}
}

View File

@@ -0,0 +1,50 @@
//
// Mono.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging
{
[Serializable]
public enum CryptographicProviderType
{
Dss = 3,
Fortezza = 4,
MicrosoftExchange = 5,
None = 0,
RsaFull = 1,
RsqSig = 2,
Ssl = 6,
SttAcq = 8,
SttBrnd = 9,
SttIss = 11,
SttMer = 7,
SttRoot = 10
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging
{
[Serializable]
public enum EncryptionAlgorithm
{
None = 0,
Rc2 = 26114,
Rc4 = 26625
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging
{
[Serializable]
public enum EncryptionRequired
{
Body = 2,
None = 0,
Optional = 1
}
}

View File

@@ -0,0 +1,44 @@
//
// Mono.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Mono.Messaging
{
[Serializable]
public enum HashAlgorithm
{
Mac = 32773,
Md2 = 32769,
Md4 = 32770,
Md5 = 32771,
None = 0,
Sha = 32772
}
}

View File

@@ -0,0 +1,219 @@
//
// Mono.Messaging
//
// Authors:
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2008 Michael Barker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.IO;
namespace Mono.Messaging {
public interface IMessage {
AcknowledgeTypes AcknowledgeType {
get; set;
}
Acknowledgment Acknowledgment {
get;
}
IMessageQueue AdministrationQueue {
get; set;
}
int AppSpecific {
get; set;
}
DateTime ArrivedTime {
get;
}
bool AttachSenderId {
get; set;
}
bool Authenticated {
get;
}
string AuthenticationProviderName {
get; set;
}
CryptographicProviderType AuthenticationProviderType {
get; set;
}
Stream BodyStream {
get; set;
}
int BodyType {
get; set;
}
Guid ConnectorType {
get; set;
}
string CorrelationId {
get; set;
}
IMessageQueue DestinationQueue {
get;
}
byte[] DestinationSymmetricKey {
get; set;
}
byte[] DigitalSignature {
get; set;
}
EncryptionAlgorithm EncryptionAlgorithm {
get; set;
}
byte[] Extension {
get; set;
}
HashAlgorithm HashAlgorithm {
get; set;
}
string Id {
get;
}
bool IsFirstInTransaction {
get;
}
bool IsLastInTransaction {
get;
}
string Label {
get;
set;
}
MessageType MessageType {
get;
}
MessagePriority Priority {
get; set;
}
bool Recoverable {
get; set;
}
IMessageQueue ResponseQueue {
get; set;
}
byte[] SenderCertificate {
get; set;
}
byte[] SenderId {
get;
}
long SenderVersion {
get;
}
DateTime SentTime {
get;
}
string SourceMachine {
get;
}
TimeSpan TimeToBeReceived {
get; set;
}
TimeSpan TimeToReachQueue {
get; set;
}
string TransactionId {
get;
}
IMessageQueue TransactionStatusQueue {
get; set;
}
bool UseAuthentication {
get; set;
}
bool UseDeadLetterQueue {
get; set;
}
bool UseEncryption {
get; set;
}
bool UseJournalQueue {
get; set;
}
bool UseTracing {
get; set;
}
/// <summary>
/// Sets all of the information about a message after is has been
/// delivered. Implementing classes should set the values of the
/// appropriate properties in this method call.
/// </summary>
void SetDeliveryInfo (Acknowledgment acknowledgment,
DateTime arrivedTime,
IMessageQueue destinationQueue,
string id,
MessageType messageType,
byte[] senderId,
long senderVersion,
DateTime sentTime,
string sourceMachine,
string transactionId);
}
}

View File

@@ -0,0 +1,65 @@
//
// Mono.Messaging
//
// Authors:
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2008 Michael Barker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.ComponentModel;
namespace Mono.Messaging {
public interface IMessageEnumerator : IDisposable {
IMessage Current { get; }
IntPtr CursorHandle { get; }
void Close();
void Dispose(bool disposing);
bool MoveNext();
bool MoveNext(TimeSpan timeout);
IMessage RemoveCurrent();
IMessage RemoveCurrent(IMessageQueueTransaction transaction);
IMessage RemoveCurrent(MessageQueueTransactionType transactionType);
IMessage RemoveCurrent(TimeSpan timeout);
IMessage RemoveCurrent(TimeSpan timeout, IMessageQueueTransaction transaction);
IMessage RemoveCurrent(TimeSpan timeout, MessageQueueTransactionType transactionType);
}
}

View File

@@ -0,0 +1,199 @@
//
// Mono.Messaging
//
// Authors:
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2008 Michael Barker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.ComponentModel;
namespace Mono.Messaging {
public interface IMessageQueue {
bool Authenticate {
get; set;
}
short BasePriority {
get; set;
}
bool CanRead {
get;
}
bool CanWrite {
get;
}
Guid Category {
get; set;
}
DateTime CreateTime {
get;
}
bool DenySharedReceive {
get; set;
}
EncryptionRequired EncryptionRequired {
get; set;
}
Guid Id {
get;
}
DateTime LastModifyTime {
get;
}
long MaximumJournalSize {
get; set;
}
long MaximumQueueSize {
get; set;
}
IntPtr ReadHandle {
get;
}
ISynchronizeInvoke SynchronizingObject {
get; set;
}
bool Transactional {
get;
}
bool UseJournalQueue {
get; set;
}
IntPtr WriteHandle {
get;
}
QueueReference QRef {
get; set;
}
void Close ();
void Purge ();
void Send (IMessage message);
void Send (IMessage message, IMessageQueueTransaction transaction);
void Send (IMessage message, MessageQueueTransactionType transactionType);
IMessage Peek ();
IMessage Peek (TimeSpan timeout);
IMessage PeekById (string id);
IMessage PeekById (string id, TimeSpan timeout);
IMessage PeekByCorrelationId (string correlationId);
IMessage PeekByCorrelationId (string correlationId, TimeSpan timeout);
IMessage Receive ();
IMessage Receive (TimeSpan timeout);
IMessage Receive (IMessageQueueTransaction transaction);
IMessage Receive (TimeSpan timeout, IMessageQueueTransaction transaction);
IMessage Receive (MessageQueueTransactionType transactionType);
IMessage Receive (TimeSpan timeout, MessageQueueTransactionType transactionType);
IMessage ReceiveById (string id);
IMessage ReceiveById (string id, TimeSpan timeout);
IMessage ReceiveById (string id, IMessageQueueTransaction transaction);
IMessage ReceiveById (string id, MessageQueueTransactionType transactionType);
IMessage ReceiveById (string id, TimeSpan timeout, IMessageQueueTransaction transaction);
IMessage ReceiveById (string id, TimeSpan timeout, MessageQueueTransactionType transactionType);
IMessage ReceiveByCorrelationId (string correlationId);
IMessage ReceiveByCorrelationId (string correlationId, TimeSpan timeout);
IMessage ReceiveByCorrelationId (string correlationId, IMessageQueueTransaction transaction);
IMessage ReceiveByCorrelationId (string correlationId, MessageQueueTransactionType transactionType);
IMessage ReceiveByCorrelationId (string correlationId, TimeSpan timeout, IMessageQueueTransaction transaction);
IMessage ReceiveByCorrelationId (string correlationId, TimeSpan timeout, MessageQueueTransactionType transactionType);
IAsyncResult BeginPeek ();
IAsyncResult BeginPeek (TimeSpan timeout);
IAsyncResult BeginPeek (TimeSpan timeout, object stateObject);
IAsyncResult BeginPeek (TimeSpan timeout, object stateObject, AsyncCallback callback);
IMessage EndPeek (IAsyncResult asyncResult);
IAsyncResult BeginReceive ();
IAsyncResult BeginReceive (TimeSpan timeout);
IAsyncResult BeginReceive (TimeSpan timeout, object stateObject);
IAsyncResult BeginReceive (TimeSpan timeout, object stateObject, AsyncCallback callback);
IMessage EndReceive (IAsyncResult asyncResult);
IMessageEnumerator GetMessageEnumerator ();
event CompletedEventHandler PeekCompleted;
event CompletedEventHandler ReceiveCompleted;
void SendReceiveCompleted (IAsyncResult result);
void SendPeekCompleted (IAsyncResult result);
}
}

View File

@@ -0,0 +1,47 @@
//
// Mono.Messaging
//
// Authors:
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2008 Michael Barker
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.ComponentModel;
namespace Mono.Messaging {
public interface IMessageQueueTransaction : IDisposable {
MessageQueueTransactionStatus Status { get; }
void Abort ();
void Begin ();
void Commit ();
}
}

Some files were not shown because too many files have changed in this diff Show More