4 // Author: Atsushi Enomoto <atsushi@ximian.com>
6 // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
8 // Permission is hereby granted, free of charge, to any person obtaining
9 // a copy of this software and associated documentation files (the
10 // "Software"), to deal in the Software without restriction, including
11 // without limitation the rights to use, copy, modify, merge, publish,
12 // distribute, sublicense, and/or sell copies of the Software, and to
13 // permit persons to whom the Software is furnished to do so, subject to
14 // the following conditions:
16 // The above copyright notice and this permission notice shall be
17 // included in all copies or substantial portions of the Software.
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 using System.Messaging;
30 using System.ServiceModel;
32 namespace System.ServiceModel.MsmqIntegration
35 public sealed class MsmqMessage<T>
37 MsmqIntegrationMessageProperty prop;
39 public MsmqMessage (T body)
41 prop = new MsmqIntegrationMessageProperty ();
45 public AcknowledgeTypes? AcknowledgeType {
46 get { return prop.AcknowledgeType; }
47 set { prop.AcknowledgeType = value; }
50 public Acknowledgment? Acknowledgment {
51 get { return prop.Acknowledgment; }
54 public Uri AdministrationQueue {
55 get { return prop.AdministrationQueue; }
56 set { prop.AdministrationQueue = value; }
59 public int? AppSpecific {
60 get { return prop.AppSpecific; }
61 set { prop.AppSpecific = value; }
64 public DateTime? ArrivedTime {
65 get { return prop.ArrivedTime; }
68 public bool? Authenticated {
69 get { return prop.Authenticated; }
73 get { return (T) prop.Body; }
74 set { prop.Body = value; }
77 public int? BodyType {
78 get { return prop.BodyType; }
79 set { prop.BodyType = value; }
82 public string CorrelationId {
83 get { return prop.CorrelationId; }
84 set { prop.CorrelationId = value; }
87 public Uri DestinationQueue {
88 get { return prop.DestinationQueue; }
91 public byte [] Extension {
92 get { return prop.Extension; }
93 set { prop.Extension = value; }
97 get { return prop.Id; }
100 public string Label {
101 get { return prop.Label; }
102 set { prop.Label = value; }
105 public MessageType? MessageType {
106 get { return prop.MessageType; }
109 public MessagePriority? Priority {
110 get { return prop.Priority; }
111 set { prop.Priority = value; }
114 public Uri ResponseQueue {
115 get { return prop.ResponseQueue; }
116 set { prop.ResponseQueue = value; }
119 public byte [] SenderId {
120 get { return prop.SenderId; }
123 public DateTime? SentTime {
124 get { return prop.SentTime; }
127 public TimeSpan? TimeToReachQueue {
128 get { return prop.TimeToReachQueue; }
129 set { prop.TimeToReachQueue = value; }