[mcs] Remove NET_4_5 ifdef from the source files
[mono.git] / mcs / class / System.ServiceModel / System.ServiceModel.MsmqIntegration / MsmqMessage.cs
1 //
2 // MsmqMessage.cs
3 //
4 // Author: Atsushi Enomoto  <atsushi@ximian.com>
5 //
6 // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
7 //
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:
15 // 
16 // The above copyright notice and this permission notice shall be
17 // included in all copies or substantial portions of the Software.
18 // 
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.
26 //
27
28 using System;
29 using System.Messaging;
30 using System.ServiceModel;
31
32 namespace System.ServiceModel.MsmqIntegration
33 {
34         [MessageContract]
35         public sealed class MsmqMessage<T>
36         {
37                 MsmqIntegrationMessageProperty prop;
38
39                 public MsmqMessage (T body)
40                 {
41                         prop = new MsmqIntegrationMessageProperty ();
42                         Body = body;
43                 }
44
45                 public AcknowledgeTypes? AcknowledgeType {
46                         get { return prop.AcknowledgeType; }
47                         set { prop.AcknowledgeType = value; }
48                 }
49
50                 public Acknowledgment? Acknowledgment {
51                         get { return prop.Acknowledgment; }
52                 }
53                 
54                 public Uri AdministrationQueue {
55                         get { return prop.AdministrationQueue; }
56                         set { prop.AdministrationQueue = value; }
57                 }
58
59                 public int? AppSpecific {
60                         get { return prop.AppSpecific; }
61                         set { prop.AppSpecific = value; }
62                 }
63
64                 public DateTime? ArrivedTime {
65                         get { return prop.ArrivedTime; }
66                 }
67
68                 public bool? Authenticated {
69                         get { return prop.Authenticated; }
70                 }
71
72                 public T Body {
73                         get { return (T) prop.Body; }
74                         set { prop.Body = value; }
75                 }
76
77                 public int? BodyType {
78                         get { return prop.BodyType; }
79                         set { prop.BodyType = value; }
80                 }
81
82                 public string CorrelationId {
83                         get { return prop.CorrelationId; }
84                         set { prop.CorrelationId = value; }
85                 }
86
87                 public Uri DestinationQueue {
88                         get { return prop.DestinationQueue; }
89                 }
90
91                 public byte [] Extension {
92                         get { return prop.Extension; }
93                         set { prop.Extension = value; }
94                 }
95
96                 public string Id {
97                         get { return prop.Id; }
98                 }
99
100                 public string Label {
101                         get { return prop.Label; }
102                         set { prop.Label = value; }
103                 }
104
105                 public MessageType? MessageType {
106                         get { return prop.MessageType; }
107                 }
108
109                 public MessagePriority? Priority {
110                         get { return prop.Priority; }
111                         set { prop.Priority = value; }
112                 }
113
114                 public Uri ResponseQueue {
115                         get { return prop.ResponseQueue; }
116                         set { prop.ResponseQueue = value; }
117                 }
118
119                 public byte [] SenderId {
120                         get { return prop.SenderId; }
121                 }
122
123                 public DateTime? SentTime {
124                         get { return prop.SentTime; }
125                 }
126
127                 public TimeSpan? TimeToReachQueue {
128                         get { return prop.TimeToReachQueue; }
129                         set { prop.TimeToReachQueue = value; }
130                 }
131         }
132 }