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,94 @@
//
// System.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 System.Messaging
{
public class AccessControlEntry
{
#region Constructor
[MonoTODO]
public AccessControlEntry()
{
}
[MonoTODO]
public AccessControlEntry(Trustee trustee)
{
throw new NotImplementedException();
}
[MonoTODO]
public AccessControlEntry(Trustee trustee,
GenericAccessRights genericAccessRights,
StandardAccessRights standardAccessRights,
AccessControlEntryType entryType)
{
throw new NotImplementedException();
}
#endregion //Constructor
#region Properties
public AccessControlEntryType EntryType {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
public GenericAccessRights GenericAccessRights {
[MonoTODO]
get {throw new NotImplementedException(); }
[MonoTODO]
set {throw new NotImplementedException(); }
}
public StandardAccessRights StandardAccessRights {
[MonoTODO]
get { throw new NotImplementedException();}
[MonoTODO]
set { throw new NotImplementedException();}
}
public Trustee Trustee {
[MonoTODO]
get { throw new NotImplementedException();}
[MonoTODO]
set { throw new NotImplementedException();}
}
protected int CustomAccessRights {
[MonoTODO]
get { throw new NotImplementedException(); }
[MonoTODO]
set { throw new NotImplementedException(); }
}
#endregion //Properties
}
}

View File

@@ -0,0 +1,42 @@
//
// System.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 System.Messaging
{
[Serializable]
public enum AccessControlEntryType
{
Allow = 1,
Deny = 3,
Revoke = 4,
Set = 2
}
}

View File

@@ -0,0 +1,71 @@
//
// 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.
//
//
// System.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) 2003 Peter Van Isacker
//
using System;
using System.Collections;
namespace System.Messaging
{
public class AccessControlList: CollectionBase
{
[MonoTODO]
public AccessControlList()
{
}
[MonoTODO]
public int Add(AccessControlEntry entry) {
throw new NotImplementedException();
}
[MonoTODO]
public bool Contains(AccessControlEntry entry) {
throw new NotImplementedException();
}
[MonoTODO]
public void CopyTo(AccessControlEntry[] array, int index) {
if (array == null)
throw new ArgumentNullException();
if (index < 0)
throw new ArgumentOutOfRangeException();
throw new NotImplementedException();
}
[MonoTODO]
public int IndexOf(AccessControlEntry entry) {
throw new NotImplementedException();
}
[MonoTODO]
public void Insert(int index, AccessControlEntry entry) {
throw new NotImplementedException();
}
[MonoTODO]
public void Remove(AccessControlEntry entry) {
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,47 @@
//
// System.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 System.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 @@
//
// System.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 System.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,73 @@
//
// 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.
//
//
// System.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
//
// (C) 2003 Peter Van Isacker
//
using System;
namespace System.Messaging
{
public class ActiveXMessageFormatter: IMessageFormatter, ICloneable
{
[MonoTODO]
public ActiveXMessageFormatter()
{
}
[MonoTODO]
public bool CanRead(Message message)
{
throw new NotImplementedException();
}
[MonoTODO]
public object Clone()
{
throw new NotImplementedException();
}
[MonoTODO]
public static void InitStreamedObject(object streamedObject)
{
throw new NotImplementedException();
}
[MonoTODO]
public object Read(Message message)
{
throw new NotImplementedException();
}
[MonoTODO]
public void Write(Message message, object obj)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,120 @@
//
// 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.
//
//
// System.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
// Rafael Teixeira (rafaelteixeirabr@hotmail.com)
// Michael Barker (mike@middlesoft.co.uk)
//
// (C) 2003 Peter Van Isacker
//
using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Serialization.Formatters.Binary;
namespace System.Messaging
{
public class BinaryMessageFormatter : IMessageFormatter, ICloneable
{
private BinaryFormatter _formatter;
public BinaryMessageFormatter ()
{
_formatter = new BinaryFormatter ();
}
public BinaryMessageFormatter (FormatterAssemblyStyle topObjectFormat, FormatterTypeStyle typeFormat)
{
_formatter = new BinaryFormatter ();
_formatter.AssemblyFormat = topObjectFormat;
_formatter.TypeFormat = typeFormat;
}
[DefaultValue (0)]
[MessagingDescription ("MsgTopObjectFormat")]
public FormatterAssemblyStyle TopObjectFormat {
get {
return _formatter.AssemblyFormat;
}
set {
_formatter.AssemblyFormat = value;
}
}
[DefaultValue (0)]
[MessagingDescription ("MsgTypeFormat")]
public FormatterTypeStyle TypeFormat {
get {
return _formatter.TypeFormat;
}
set {
_formatter.TypeFormat = value;
}
}
[MonoTODO ("only return true if body type is binary")]
public bool CanRead (Message message)
{
if (message == null)
throw new ArgumentNullException ();
return message.BodyStream.CanRead;
}
[MonoTODO ("throw InvalidOperationException if message body is not binary")]
public object Read (Message message)
{
if (message == null)
throw new ArgumentNullException ();
message.BodyStream.Seek (0, SeekOrigin.Begin);
return _formatter.Deserialize (message.BodyStream);
}
[MonoTODO ("throw InvalidOperationException if message body is not binary")]
public void Write (Message message, object obj)
{
if (message == null)
throw new ArgumentNullException ();
Stream stream = message.BodyStream;
if (stream == null) {
stream = new MemoryStream ();
message.BodyStream = stream;
}
message.BodyType = 768;
_formatter.Serialize (stream, obj);
}
public object Clone ()
{
return new BinaryMessageFormatter (TopObjectFormat, TypeFormat);
}
}
}

View File

@@ -0,0 +1,144 @@
2010-02-09 Chris Toshok <toshok@ximian.com>
* MessageQueue.cs: stub out the ctor that takes a QueueAccessMode.
* QueueAccessMode.cs: new enum.
2009-07-11 Michael Barker <mike@middlesoft.co.uk>
* MessageQueueException.cs: Removed MonoTODO.
2009-05-23 Michael Barker <mike@middlesoft.co.uk>
* MessageEnumerator.cs: Added calls to the delegate IMessageEnumerator
for methods that use a timeout and added exception handling.
2008-12-20 Michael Barker <mike@middlesoft.co.uk>
* MessageQueue.cs: Added implementation for async methods: BeginReceive,
BeginPeek, EndReceive and EndPeek. Set up event handlers to propagate
Asycn ReceiveCompleted/PeekCompleted events to System.Messaging API users.
2008-11-23 Michael Barker <mike@middlesoft.co.uk>
* MessageQueue.cs: Added support for MessageQueueTransactionType methods,
ReceiveBy{Id,CorrelationId} and PeekBy{Id,CorrelationId} methods.
2008-11-02 Michael Barker <mike@middlesoft.co.uk>
* MessageQueue.cs: Added implementation for deleting, purging, sending with
labels and message transactions.
2008-10-27 Michael Barker <mike@middlesoft.co.uk>
* MessageQueueTransaction.cs: Delegated all methods to IMessageQueueTransaction
from Mono.Messaging.
2008-10-12 Michael Barker <mike@middlesoft.co.uk>
* MessageQueue.cs: Implemented GetMessageEnumerator().
* MessageEnumerator.cs: Implemented, delegate most work to Mono.Messaging.
* Message.cs: Removed [MonoTODO] and small style fix.
2008-09-29 Michael Barker <mike@middlesoft.co.uk>
* IMessageFormatter.cs: Added internal enum for body types.
* XmlMessageFormatter.cs: Implemented read/write methods.
* BinaryMessageFormatter.cs: Implemented read/write methods.
* Message.cs: Implemented formatter support.
* MessageQueue.cs: Implemented Send and Receive methods. Implemented
formatter support.
* MessageQueueException.cs: Added custom error messages.
2008-09-09 Michael Barker <mike@middlesoft.co.uk>
* Message.cs: Change properties to delegate to IMessage. Added internal
constructor.
* MessageQueue.cs: Change properties to delegate to IMessageQueue. Added
internal constructor. Removed private constructor.
2004-09-10 Sebastien Pouliot <sebastien@ximian.com>
* MessageQueuePermission.cs: Implemented enough TODO so compilers can
call ToXml (and the runtime can call FromXml) without exceptions.
* MessageQueuePermissionAttribute.cs: Implemented all TODO.
* MessageQueuePermissionEntry.cs: Implemented all TODO.
* MessageQueuePermissionEntryCollection.cs: Removed Clear on On*
methods and added TODO.
2004-06-16 Gert Driesen <drieseng@users.sourceforge.net>
* AccessControlEntryType.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* AcknowledgeTypes.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* CryptographicProviderType.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* EncryptionAlgorithm.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* EncryptionRequired.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* GenericAccessRights.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* HashAlgortihm.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* MessagePriority.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* MessageQueueErrorCode.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* MessageQueueException.cs: marked serializable
* MessageQueuePermissionAccess.cs: fixed enum field values to
correspond with MS.NET, removed TODO
* MessageQueueTransactionStatus.cs: fixed enum field values to
correspond with MS.NET, removed TODO
* MessageQueueTransactionType.cs: fixed enum field values to
correspond with MS.NET, removed TODO
* MessageType.cs: fixed enum field values to correspond with MS.NET,
removed TODO
* StandardAccessRights.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* TrusteeType.cs: fixed enum field values to correspond with MS.NET,
removed TODO
2004-06-03 Duncan Mak <duncan@ximian.com>
* MonoTODO.cs: Remove the Description field and use Comment, this
makes it consistent with the other TODOAttributes, and it also
fixes the build.
2004-06-02 Gert Driesen <drieseng@users.sourceforge.net>
* AccessControlEntry.cs: removed extra finalizer
* AccessControlList.cs: removed extra finalizer
* ActiveXMessageFormatter.cs: removed extra finalizer
* BinaryMessageFormatter.cs: public API fixes
* DefaultPropertiesToSend.cs: public API fixes
* IMessageFormatter.cs: public API fixes
* Message.cs: public API fixes
* MessageEnumerator.cs: public API fixes
* MessagePropertyFilter.cs: public API fixes
* MessageQueue.cs: public API fixes
* MessageQueueAccessControlEntry.cs: public API fixes
* MessageQueueEnumerator.cs: public API fixes
* MessageQueueException.cs: public API fixes
* MessageQueueInstaller.cs: public API fixes
* MessageQueuePermission.cs: public API fixes
* MessageQueuePermissionAttribute.cs: public API fixes
* MessageQueuePermissionEntry.cs: public API fixes
* MessageQueuePermissionEntryCollection.cs: public API
fixes
* MessagingDescriptionAttribute.cs: public API fixes
* PeekCompletedEventArgs.cs: public API fixes
* ReceiveCompletedEventArgs.cs: public API fixes
* Trustee.cs: removed extra finalizer
* XmlMessageFormatter.cs: public API fixes
2004-05-29 Gert Driesen <drieseng@users.sourceforge.net>
* Acknowledgment.cs: added/corrected values, removed TODO
* MessageQueueErrorCode.cs: fixed typo
* MessageQueueAccessRights.cs: removed extra enum field
2003-02-23 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
* added just files enough to compile a dummy DLL for now

View File

@@ -0,0 +1,50 @@
//
// System.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 System.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,216 @@
//
// System.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;
using System.ComponentModel;
using System.ComponentModel.Design;
namespace System.Messaging
{
[TypeConverter (typeof(ExpandableObjectConverter))]
public class DefaultPropertiesToSend
{
[MonoTODO]
public DefaultPropertiesToSend()
{
}
[DefaultValue (AcknowledgeTypes.None)]
[MessagingDescription ("MsgAcknowledgeType")]
public AcknowledgeTypes AcknowledgeType {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (null)]
[MessagingDescription ("MsgAdministrationQueue")]
public MessageQueue AdministrationQueue {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (0)]
[MessagingDescription ("MsgAppSpecific")]
public int AppSpecific {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (true)]
[MessagingDescription ("MsgAttachSenderId")]
public bool AttachSenderId {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (EncryptionAlgorithm.Rc2)]
[MessagingDescription ("MsgEncryptionAlgorithm")]
public EncryptionAlgorithm EncryptionAlgorithm {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[Editor ("System.ComponentModel.Design.ArrayEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
[MessagingDescription ("MsgExtension")]
public byte[] Extension {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (HashAlgorithm.Md5)]
[MessagingDescription ("MsgHashAlgorithm")]
public HashAlgorithm HashAlgorithm {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue ("")]
[MessagingDescription ("MsgLabel")]
public string Label {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (MessagePriority.Normal)]
[MessagingDescription ("MsgPriority")]
public MessagePriority Priority {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (false)]
[MessagingDescription ("MsgRecoverable")]
public bool Recoverable {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (null)]
[MessagingDescription ("MsgResponseQueue")]
public MessageQueue ResponseQueue {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[TypeConverter (typeof(TimeoutConverter))]
[MessagingDescription ("MsgTimeToBeReceived")]
public TimeSpan TimeToBeReceived {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[TypeConverter (typeof(TimeoutConverter))]
[MessagingDescription ("MsgTimeToReachQueue")]
public TimeSpan TimeToReachQueue {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (null)]
[MessagingDescription ("MsgTransactionStatusQueue")]
public MessageQueue TransactionStatusQueue {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (false)]
[MessagingDescription ("MsgUseAuthentication")]
public bool UseAuthentication {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (false)]
[MessagingDescription ("MsgUseDeadLetterQueue")]
public bool UseDeadLetterQueue {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (false)]
[MessagingDescription ("MsgUseEncryption")]
public bool UseEncryption {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (false)]
[MessagingDescription ("MsgUseJournalQueue")]
public bool UseJournalQueue {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
[DefaultValue (false)]
[MessagingDescription ("MsgUseTracing")]
public bool UseTracing {
[MonoTODO]
get {throw new NotImplementedException();}
[MonoTODO]
set {throw new NotImplementedException();}
}
}
}

View File

@@ -0,0 +1,41 @@
//
// System.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 System.Messaging
{
[Serializable]
public enum EncryptionAlgorithm
{
None = 0,
Rc2 = 26114,
Rc4 = 26625
}
}

View File

@@ -0,0 +1,41 @@
//
// System.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 System.Messaging
{
[Serializable]
public enum EncryptionRequired
{
Body = 2,
None = 0,
Optional = 1
}
}

View File

@@ -0,0 +1,44 @@
//
// System.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 System.Messaging
{
[Flags]
[Serializable]
public enum GenericAccessRights
{
All = 268435456,
Execute = 536870912,
None = 0,
Read = -2147483648,
Write = 1073741824
}
}

View File

@@ -0,0 +1,44 @@
//
// System.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 System.Messaging
{
[Serializable]
public enum HashAlgorithm
{
Mac = 32773,
Md2 = 32769,
Md4 = 32770,
Md5 = 32771,
None = 0,
Sha = 32772
}
}

View File

@@ -0,0 +1,52 @@
//
// System.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;
using System.ComponentModel;
using System.Messaging.Design;
namespace System.Messaging
{
[TypeConverter (typeof(MessageFormatterConverter))]
public interface IMessageFormatter: ICloneable
{
bool CanRead(Message message);
object Read(Message message);
void Write(Message message, object obj);
}
internal enum FormatterTypes
{
Xml = 0,
Binary = 768
}
}

View File

@@ -0,0 +1,472 @@
//
// System.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
// Rafael Teixeira (rafaelteixeirabr@hotmail.com)
//
// (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;
using System.IO;
using System.ComponentModel;
using Mono.Messaging;
namespace System.Messaging
{
[DesignerAttribute ("System.Messaging.Design.MessageDesigner, " + Consts.AssemblySystem_Design)]
public class Message: Component
{
private readonly IMessage delegateMessage;
private IMessageFormatter formatter;
//private int bodyType = 0;
private object body;
#region Constructor
public Message() : this (CreateMessage (), null, null)
{
}
public Message (object body) : this (CreateMessage (), body, null)
{
}
public Message (object body, IMessageFormatter formatter)
: this (CreateMessage (), body, formatter)
{
}
internal Message (IMessage delegateMessage, object body,
IMessageFormatter formatter)
{
this.delegateMessage = delegateMessage;
this.body = body;
this.formatter = formatter;
}
#endregion //Constructor
[MonoTODO]
public static readonly TimeSpan InfiniteTimeout;
#region Properties
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgAcknowledgeType")]
public AcknowledgeTypes AcknowledgeType {
get {
return (AcknowledgeTypes) delegateMessage.AcknowledgeType;
}
set {
delegateMessage.AcknowledgeType = (Mono.Messaging.AcknowledgeTypes) value;
}
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgAcknowledgement")]
public Acknowledgment Acknowledgment {
get {
return (Acknowledgment) (int) delegateMessage.Acknowledgment;
}
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgAdministrationQueue")]
public MessageQueue AdministrationQueue {
get {
if (delegateMessage.AdministrationQueue == null)
return null;
return new MessageQueue
(delegateMessage.AdministrationQueue);
}
set {
delegateMessage.AdministrationQueue
= value.DelegateQueue;
}
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgAppSpecific")]
public int AppSpecific {
get { return delegateMessage.AppSpecific; }
set { delegateMessage.AppSpecific = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[MessagingDescription ("MsgArrivedTime")]
public DateTime ArrivedTime {
get { return delegateMessage.ArrivedTime; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgAttachSenderId")]
public bool AttachSenderId {
get { return delegateMessage.AttachSenderId; }
set { delegateMessage.AttachSenderId = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[MessagingDescription ("MsgAuthenticated")]
public bool Authenticated {
get { return delegateMessage.Authenticated; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgAuthenticationProviderName")]
public string AuthenticationProviderName {
get { return delegateMessage.AuthenticationProviderName; }
set { delegateMessage.AuthenticationProviderName = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgAuthenticationProviderType")]
public CryptographicProviderType AuthenticationProviderType {
get {
return (CryptographicProviderType)
delegateMessage.AuthenticationProviderType;
}
set {
delegateMessage.AuthenticationProviderType =
(Mono.Messaging.CryptographicProviderType) value;
}
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
public object Body {
get {
if (body == null && delegateMessage.BodyStream == null)
return null;
else if (body == null)
body = formatter.Read (this);
return body;
}
set { body = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[Editor ("System.ComponentModel.Design.BinaryEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
[MessagingDescription ("MsgBodyStream")]
public Stream BodyStream {
get { return delegateMessage.BodyStream; }
set { delegateMessage.BodyStream = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[MessagingDescription ("MsgBodyType")]
[ReadOnly (true)]
public int BodyType {
get { return delegateMessage.BodyType; }
set { delegateMessage.BodyType = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgConnectorType")]
public Guid ConnectorType {
get { return delegateMessage.ConnectorType; }
set { delegateMessage.ConnectorType = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgCorrelationId")]
public string CorrelationId {
get { return delegateMessage.CorrelationId; }
set { delegateMessage.CorrelationId = value; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[MessagingDescription("MsgDestinationQueue")]
public MessageQueue DestinationQueue {
get {
return new MessageQueue(delegateMessage.DestinationQueue);
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgDestinationSymmetricKey")]
public byte[] DestinationSymmetricKey {
get { return delegateMessage.DestinationSymmetricKey; }
set { delegateMessage.DestinationSymmetricKey = value; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgDigitalSignature")]
public byte[] DigitalSignature {
get { return delegateMessage.DigitalSignature; }
set { delegateMessage.DigitalSignature = value; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgEncryptionAlgorithm")]
public EncryptionAlgorithm EncryptionAlgorithm {
get {
return (EncryptionAlgorithm) delegateMessage.EncryptionAlgorithm;
}
set {
delegateMessage.EncryptionAlgorithm =
(Mono.Messaging.EncryptionAlgorithm) value;
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgExtension")]
public byte[] Extension {
get { return delegateMessage.Extension; }
set { delegateMessage.Extension = value; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Browsable(false)]
public IMessageFormatter Formatter {
get { return formatter; }
set { formatter = value; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgHashAlgorithm")]
public HashAlgorithm HashAlgorithm {
get {
return (HashAlgorithm) delegateMessage.HashAlgorithm;
}
set {
delegateMessage.HashAlgorithm =
(Mono.Messaging.HashAlgorithm) value;
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgId")]
public string Id {
get { return delegateMessage.Id; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[MessagingDescription("MsgIsFirstInTransaction")]
public bool IsFirstInTransaction {
get { return delegateMessage.IsFirstInTransaction; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[MessagingDescription("MsgIsLastInTransaction")]
public bool IsLastInTransaction {
get { return delegateMessage.IsLastInTransaction; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgLabel")]
public string Label {
get { return delegateMessage.Label; }
set { delegateMessage.Label = value; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[MessagingDescription("MsgMessageType")]
public MessageType MessageType {
get {
return (MessageType) delegateMessage.MessageType;
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgPriority")]
public MessagePriority Priority {
get {
return (MessagePriority) delegateMessage.Priority;
}
set {
delegateMessage.Priority = (Mono.Messaging.MessagePriority) value;
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgRecoverable")]
public bool Recoverable {
get { return delegateMessage.Recoverable; }
set { delegateMessage.Recoverable = value; }
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgResponseQueue")]
public MessageQueue ResponseQueue {
get {
if (delegateMessage.ResponseQueue == null)
return null;
return new MessageQueue
(delegateMessage.ResponseQueue);
}
set {
delegateMessage.ResponseQueue
= value.DelegateQueue;
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
[MessagingDescription("MsgSenderCertificate")]
public byte[] SenderCertificate {
get { return delegateMessage.SenderCertificate; }
set { delegateMessage.SenderCertificate = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[MessagingDescription ("MsgSenderId")]
public byte[] SenderId {
get { return delegateMessage.SenderId; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgSenderVersion")]
public long SenderVersion {
get { return delegateMessage.SenderVersion; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgSentTime")]
public DateTime SentTime {
get { return delegateMessage.SentTime; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[MessagingDescription ("MsgSourceMachine")]
public string SourceMachine {
get { return delegateMessage.SourceMachine; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgTimeToBeReceived")]
[TypeConverter (typeof(TimeoutConverter))]
public TimeSpan TimeToBeReceived {
get { return delegateMessage.TimeToBeReceived; }
set { delegateMessage.TimeToBeReceived = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgTimeToReachQueue")]
[TypeConverter (typeof(TimeoutConverter))]
public TimeSpan TimeToReachQueue {
get { return delegateMessage.TimeToReachQueue; }
set { delegateMessage.TimeToReachQueue = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[MessagingDescription ("MsgTransactionId")]
public string TransactionId {
get { return delegateMessage.TransactionId; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgTransactionStatusQueue")]
public MessageQueue TransactionStatusQueue {
get {
return new MessageQueue(delegateMessage.TransactionStatusQueue);
}
set {
delegateMessage.TransactionStatusQueue = value.DelegateQueue;
}
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgUseAuthentication")]
public bool UseAuthentication {
get { return delegateMessage.UseAuthentication; }
set { delegateMessage.UseAuthentication = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgUseDeadLetterQueue")]
public bool UseDeadLetterQueue {
get { return delegateMessage.UseDeadLetterQueue; }
set { delegateMessage.UseDeadLetterQueue = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgUseEncryption")]
public bool UseEncryption {
get { return delegateMessage.UseEncryption; }
set { delegateMessage.UseEncryption = value; }
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgUseJournalQueue")]
public bool UseJournalQueue {
get { return delegateMessage.UseJournalQueue; }
set { delegateMessage.UseJournalQueue = value;}
}
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
[MessagingDescription ("MsgUseTracing")]
public bool UseTracing {
get { return delegateMessage.UseTracing; }
set { delegateMessage.UseTracing = value; }
}
internal IMessage DelegateMessage {
get { return delegateMessage; }
}
#endregion //Properties
internal static IMessage CreateMessage ()
{
return MessagingProviderLocator.GetProvider ()
.CreateMessage ();
}
}
}

View File

@@ -0,0 +1,211 @@
//
// System.Messaging
//
// Authors:
// Peter Van Isacker (sclytrack@planetinternet.be)
// Michael Barker (mike@middlesoft.co.uk)
//
// (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;
using System.Collections;
using Mono.Messaging;
namespace System.Messaging
{
public class MessageEnumerator: MarshalByRefObject, IEnumerator, IDisposable
{
private IMessageEnumerator delegateEnumerator;
private IMessageFormatter formatter;
internal MessageEnumerator (IMessageEnumerator delegateEnumerator, IMessageFormatter formatter)
{
this.delegateEnumerator = delegateEnumerator;
this.formatter = formatter;
}
public Message Current {
get {
IMessage iMsg = delegateEnumerator.Current;
if (iMsg == null)
return null;
return new Message (iMsg, null, formatter);
}
}
object IEnumerator.Current {
get { return Current; }
}
public IntPtr CursorHandle {
get { return delegateEnumerator.CursorHandle; }
}
public void Close()
{
delegateEnumerator.Close ();
}
public void Dispose()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose(bool disposing)
{
delegateEnumerator.Dispose ();
Close();
}
public bool MoveNext()
{
return delegateEnumerator.MoveNext ();
}
public bool MoveNext (TimeSpan timeout)
{
return delegateEnumerator.MoveNext (timeout);
}
public Message RemoveCurrent()
{
try {
IMessage iMsg = delegateEnumerator.RemoveCurrent ();
if (iMsg == null)
return null;
return new Message (iMsg, null, formatter);
} catch (ConnectionException e) {
throw new MessageQueueException (MessageQueueErrorCode.QueueNotAvailable, e.Message);
} catch (MessageUnavailableException e) {
throw new InvalidOperationException (e.Message, e);
} catch (MonoMessagingException e) {
throw new MessageQueueException (MessageQueueErrorCode.Generic, e.Message);
}
}
public Message RemoveCurrent (MessageQueueTransaction transaction)
{
try {
IMessage iMsg = delegateEnumerator.RemoveCurrent (transaction.DelegateTx);
if (iMsg == null)
return null;
return new Message (iMsg, null, formatter);
} catch (ConnectionException e) {
throw new MessageQueueException (MessageQueueErrorCode.QueueNotAvailable, e.Message);
} catch (MessageUnavailableException e) {
throw new InvalidOperationException (e.Message, e);
} catch (MonoMessagingException e) {
throw new MessageQueueException (MessageQueueErrorCode.Generic, e.Message);
}
}
public Message RemoveCurrent(MessageQueueTransactionType transactionType)
{
try {
IMessage iMsg = delegateEnumerator.RemoveCurrent ((Mono.Messaging.MessageQueueTransactionType) transactionType);
if (iMsg == null)
return null;
return new Message (iMsg, null, formatter);
} catch (ConnectionException e) {
throw new MessageQueueException (MessageQueueErrorCode.QueueNotAvailable, e.Message);
} catch (MessageUnavailableException e) {
throw new InvalidOperationException (e.Message, e);
} catch (MonoMessagingException e) {
throw new MessageQueueException (MessageQueueErrorCode.Generic, e.Message);
}
}
public Message RemoveCurrent (TimeSpan timeout)
{
try {
IMessage iMsg = delegateEnumerator.RemoveCurrent (timeout);
if (iMsg == null)
return null;
return new Message (iMsg, null, formatter);
} catch (ConnectionException e) {
throw new MessageQueueException (MessageQueueErrorCode.QueueNotAvailable, e.Message);
} catch (MessageUnavailableException e) {
throw new InvalidOperationException (e.Message, e);
} catch (MonoMessagingException e) {
throw new MessageQueueException (MessageQueueErrorCode.Generic, e.Message);
}
}
public Message RemoveCurrent (TimeSpan timeout,
MessageQueueTransaction transaction)
{
try {
IMessage iMsg = delegateEnumerator.RemoveCurrent (timeout,
transaction.DelegateTx);
if (iMsg == null)
return null;
return new Message (iMsg, null, formatter);
} catch (ConnectionException e) {
throw new MessageQueueException (MessageQueueErrorCode.QueueNotAvailable, e.Message);
} catch (MessageUnavailableException e) {
throw new InvalidOperationException (e.Message, e);
} catch (MonoMessagingException e) {
throw new MessageQueueException (MessageQueueErrorCode.Generic, e.Message);
}
}
public Message RemoveCurrent (TimeSpan timeout, MessageQueueTransactionType transactionType)
{
try {
IMessage iMsg = delegateEnumerator.RemoveCurrent (timeout,
(Mono.Messaging.MessageQueueTransactionType) transactionType);
if (iMsg == null)
return null;
return new Message (iMsg, null, formatter);
} catch (ConnectionException e) {
throw new MessageQueueException (MessageQueueErrorCode.QueueNotAvailable, e.Message);
} catch (MessageUnavailableException e) {
throw new InvalidOperationException (e.Message, e);
} catch (MonoMessagingException e) {
throw new MessageQueueException (MessageQueueErrorCode.Generic, e.Message);
}
}
public void Reset()
{
Close ();
}
~MessageEnumerator()
{
Dispose(false);
}
}
}

View File

@@ -0,0 +1,46 @@
//
// System.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 System.Messaging
{
[Serializable]
public enum MessagePriority
{
AboveNormal = 4,
High = 5,
Highest = 7,
Low = 2,
Lowest = 0,
Normal = 3,
VeryHigh = 6,
VeryLow = 1
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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