-
Notifications
You must be signed in to change notification settings - Fork 0
/
type_SdtTransactionContext.cs
495 lines (441 loc) · 16.5 KB
/
type_SdtTransactionContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
/*
File: type_SdtTransactionContext
Description: TransactionContext
Author: GeneXus C# Generator version 10_3_2-86442
Generated on: 1/20/2015 7:41:53.56
Program type: Callable routine
Main DBMS: sqlserver
*/
using System;
using System.Collections;
using GeneXus.Utils;
using GeneXus.Resources;
using GeneXus.Application;
using GeneXus.Metadata;
using GeneXus.Cryptography;
using GeneXus.Data;
using GeneXus.Data.ADO;
using GeneXus.Data.NTier;
using GeneXus.Data.NTier.ADO;
using System.Runtime.Remoting;
using GeneXus.XML;
using GeneXus.Search;
using GeneXus.Encryption;
using GeneXus.Http.Client;
using System.Reflection;
using System.Xml.Serialization;
using System.Data.SqlTypes;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Runtime.Serialization;
namespace GeneXus.Programs {
[XmlSerializerFormat]
[XmlRoot(ElementName = "TransactionContext" )]
[XmlType(TypeName = "TransactionContext" , Namespace = "CalcularPeajes" )]
[System.Xml.Serialization.XmlInclude( typeof( SdtTransactionContext_Attribute ))]
[Serializable]
public class SdtTransactionContext : GxUserType
{
public SdtTransactionContext( )
{
initialize();
}
public SdtTransactionContext( IGxContext context )
{
this.context = context;
initialize();
}
private static Hashtable mapper;
public override String JsonMap( String value )
{
if ( mapper == null )
{
mapper = new Hashtable();
}
return (String)mapper[value]; ;
}
public override String ToXml( bool includeHeader ,
bool includeState ,
String name ,
String sNameSpace )
{
String s ;
XmlSerializer xmls ;
xmls = new XmlSerializer(this.GetType(), sNameSpace);
System.IO.MemoryStream stream = new System.IO.MemoryStream();
System.Xml.XmlWriter xmlw = System.Xml.XmlWriter.Create(stream, new System.Xml.XmlWriterSettings() { OmitXmlDeclaration = !includeHeader});
XmlSerializerNamespaces xmlns = new XmlSerializerNamespaces();
xmlns.Add(String.Empty, sNameSpace);
xmls.Serialize( xmlw, this, xmlns);
stream.Seek(0L, System.IO.SeekOrigin.Begin);
System.IO.StreamReader sr = new System.IO.StreamReader(stream);
s = sr.ReadToEnd();
stream.Close();
return s ;
}
public override void FromXml( String s ,
String name )
{
SdtTransactionContext deserialized ;
if (s.Trim().Length == 0)
return;
XmlSerializer xmls = new XmlSerializer(this.GetType(), "CalcularPeajes" );
System.IO.StringReader sr = new System.IO.StringReader(s);
deserialized = (SdtTransactionContext)(xmls.Deserialize( sr)) ;
sr.Close();
SdtTransactionContext obj ;
obj = this;
obj.gxTpr_Callerobject = deserialized.gxTpr_Callerobject;
obj.gxTpr_Callerondelete = deserialized.gxTpr_Callerondelete;
obj.gxTpr_Callerurl = deserialized.gxTpr_Callerurl;
obj.gxTpr_Transactionname = deserialized.gxTpr_Transactionname;
obj.gxTpr_Attributes = deserialized.gxTpr_Attributes;
return ;
}
public override short readxml( GXXMLReader oReader ,
String sName )
{
short GXSoapError = 1 ;
sTagName = oReader.Name;
if ( oReader.IsSimple == 0 )
{
GXSoapError = oReader.Read();
nOutParmCount = 0;
while ( ( ( StringUtil.StrCmp(oReader.Name, sTagName) != 0 ) || ( oReader.NodeType == 1 ) ) && ( GXSoapError > 0 ) )
{
readOk = 0;
if ( StringUtil.StrCmp2( oReader.LocalName, "CallerObject") )
{
gxTv_SdtTransactionContext_Callerobject = oReader.Value;
if ( GXSoapError > 0 )
{
readOk = 1;
}
GXSoapError = oReader.Read();
}
if ( StringUtil.StrCmp2( oReader.LocalName, "CallerOnDelete") )
{
gxTv_SdtTransactionContext_Callerondelete = (bool)(Convert.ToBoolean(((StringUtil.StrCmp(oReader.Value, "true")==0)||(StringUtil.StrCmp(oReader.Value, "1")==0) ? 1 : 0)));
if ( GXSoapError > 0 )
{
readOk = 1;
}
GXSoapError = oReader.Read();
}
if ( StringUtil.StrCmp2( oReader.LocalName, "CallerURL") )
{
gxTv_SdtTransactionContext_Callerurl = oReader.Value;
if ( GXSoapError > 0 )
{
readOk = 1;
}
GXSoapError = oReader.Read();
}
if ( StringUtil.StrCmp2( oReader.LocalName, "TransactionName") )
{
gxTv_SdtTransactionContext_Transactionname = oReader.Value;
if ( GXSoapError > 0 )
{
readOk = 1;
}
GXSoapError = oReader.Read();
}
if ( StringUtil.StrCmp2( oReader.LocalName, "Attributes") )
{
if ( gxTv_SdtTransactionContext_Attributes == null )
{
gxTv_SdtTransactionContext_Attributes = new GxObjectCollection( context, "TransactionContext.Attribute", "CalcularPeajes", "SdtTransactionContext_Attribute", "GeneXus.Programs");
}
if ( oReader.IsSimple == 0 )
{
GXSoapError = gxTv_SdtTransactionContext_Attributes.readxmlcollection(oReader, "Attributes", "Attribute");
}
if ( GXSoapError > 0 )
{
readOk = 1;
}
GXSoapError = oReader.Read();
}
nOutParmCount = (short)(nOutParmCount+1);
if ( readOk == 0 )
{
context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
GXSoapError = (short)(nOutParmCount*-1);
}
}
}
return GXSoapError ;
}
public override void writexml( GXXMLWriter oWriter ,
String sName ,
String sNameSpace )
{
writexml(oWriter, sName, sNameSpace, true);
return ;
}
public override void writexml( GXXMLWriter oWriter ,
String sName ,
String sNameSpace ,
bool sIncludeState )
{
if ( String.IsNullOrEmpty(StringUtil.RTrim( sName)) )
{
sName = "TransactionContext";
}
if ( String.IsNullOrEmpty(StringUtil.RTrim( sNameSpace)) )
{
sNameSpace = "CalcularPeajes";
}
oWriter.WriteStartElement(sName);
if ( StringUtil.StrCmp(StringUtil.Left( sNameSpace, 10), "[*:nosend]") != 0 )
{
oWriter.WriteAttribute("xmlns", sNameSpace);
}
else
{
sNameSpace = StringUtil.Right( sNameSpace, (short)(StringUtil.Len( sNameSpace)-10));
}
oWriter.WriteElement("CallerObject", StringUtil.RTrim( gxTv_SdtTransactionContext_Callerobject));
if ( StringUtil.StrCmp(sNameSpace, "CalcularPeajes") != 0 )
{
oWriter.WriteAttribute("xmlns", "CalcularPeajes");
}
oWriter.WriteElement("CallerOnDelete", StringUtil.RTrim( StringUtil.BoolToStr( gxTv_SdtTransactionContext_Callerondelete)));
if ( StringUtil.StrCmp(sNameSpace, "CalcularPeajes") != 0 )
{
oWriter.WriteAttribute("xmlns", "CalcularPeajes");
}
oWriter.WriteElement("CallerURL", StringUtil.RTrim( gxTv_SdtTransactionContext_Callerurl));
if ( StringUtil.StrCmp(sNameSpace, "CalcularPeajes") != 0 )
{
oWriter.WriteAttribute("xmlns", "CalcularPeajes");
}
oWriter.WriteElement("TransactionName", StringUtil.RTrim( gxTv_SdtTransactionContext_Transactionname));
if ( StringUtil.StrCmp(sNameSpace, "CalcularPeajes") != 0 )
{
oWriter.WriteAttribute("xmlns", "CalcularPeajes");
}
if ( gxTv_SdtTransactionContext_Attributes != null )
{
String sNameSpace1 ;
if ( StringUtil.StrCmp(sNameSpace, "CalcularPeajes") == 0 )
{
sNameSpace1 = "[*:nosend]" + "CalcularPeajes";
}
else
{
sNameSpace1 = "CalcularPeajes";
}
gxTv_SdtTransactionContext_Attributes.writexmlcollection(oWriter, "Attributes", sNameSpace1, "Attribute", sNameSpace1);
}
oWriter.WriteEndElement();
return ;
}
public override void ToJSON( )
{
ToJSON( true) ;
return ;
}
public override void ToJSON( bool includeState )
{
AddObjectProperty("CallerObject", gxTv_SdtTransactionContext_Callerobject, false);
AddObjectProperty("CallerOnDelete", gxTv_SdtTransactionContext_Callerondelete, false);
AddObjectProperty("CallerURL", gxTv_SdtTransactionContext_Callerurl, false);
AddObjectProperty("TransactionName", gxTv_SdtTransactionContext_Transactionname, false);
if ( gxTv_SdtTransactionContext_Attributes != null )
{
AddObjectProperty("Attributes", gxTv_SdtTransactionContext_Attributes, false);
}
return ;
}
[ SoapElement( ElementName = "CallerObject" )]
[ XmlElement( ElementName = "CallerObject" )]
public String gxTpr_Callerobject
{
get {
return gxTv_SdtTransactionContext_Callerobject ;
}
set {
gxTv_SdtTransactionContext_Callerobject = (String)(value);
}
}
[ SoapElement( ElementName = "CallerOnDelete" )]
[ XmlElement( ElementName = "CallerOnDelete" )]
public bool gxTpr_Callerondelete
{
get {
return gxTv_SdtTransactionContext_Callerondelete ;
}
set {
gxTv_SdtTransactionContext_Callerondelete = value;
}
}
[ SoapElement( ElementName = "CallerURL" )]
[ XmlElement( ElementName = "CallerURL" )]
public String gxTpr_Callerurl
{
get {
return gxTv_SdtTransactionContext_Callerurl ;
}
set {
gxTv_SdtTransactionContext_Callerurl = (String)(value);
}
}
[ SoapElement( ElementName = "TransactionName" )]
[ XmlElement( ElementName = "TransactionName" )]
public String gxTpr_Transactionname
{
get {
return gxTv_SdtTransactionContext_Transactionname ;
}
set {
gxTv_SdtTransactionContext_Transactionname = (String)(value);
}
}
public class gxTv_SdtTransactionContext_Attributes_SdtTransactionContext_Attribute_80compatibility:SdtTransactionContext_Attribute {}
[ SoapElement( ElementName = "Attributes" )]
[ XmlArray( ElementName = "Attributes" )]
[ XmlArrayItemAttribute( Type= typeof( SdtTransactionContext_Attribute ), ElementName= "Attribute" , IsNullable=false)]
[ XmlArrayItemAttribute( Type= typeof( gxTv_SdtTransactionContext_Attributes_SdtTransactionContext_Attribute_80compatibility ), ElementName= "TransactionContext.Attribute" , IsNullable=false)]
public GxObjectCollection gxTpr_Attributes_GxObjectCollection
{
get {
if ( gxTv_SdtTransactionContext_Attributes == null )
{
gxTv_SdtTransactionContext_Attributes = new GxObjectCollection( context, "TransactionContext.Attribute", "CalcularPeajes", "SdtTransactionContext_Attribute", "GeneXus.Programs");
}
return (GxObjectCollection)gxTv_SdtTransactionContext_Attributes ;
}
set {
if ( gxTv_SdtTransactionContext_Attributes == null )
{
gxTv_SdtTransactionContext_Attributes = new GxObjectCollection( context, "TransactionContext.Attribute", "CalcularPeajes", "SdtTransactionContext_Attribute", "GeneXus.Programs");
}
gxTv_SdtTransactionContext_Attributes = (GxObjectCollection) value;
}
}
[SoapIgnore]
[XmlIgnore]
public IGxCollection gxTpr_Attributes
{
get {
if ( gxTv_SdtTransactionContext_Attributes == null )
{
gxTv_SdtTransactionContext_Attributes = new GxObjectCollection( context, "TransactionContext.Attribute", "CalcularPeajes", "SdtTransactionContext_Attribute", "GeneXus.Programs");
}
return gxTv_SdtTransactionContext_Attributes ;
}
set {
gxTv_SdtTransactionContext_Attributes = value;
}
}
public void gxTv_SdtTransactionContext_Attributes_SetNull( )
{
gxTv_SdtTransactionContext_Attributes = null;
return ;
}
public bool gxTv_SdtTransactionContext_Attributes_IsNull( )
{
if ( gxTv_SdtTransactionContext_Attributes == null )
{
return true ;
}
return false ;
}
public void initialize( )
{
gxTv_SdtTransactionContext_Callerobject = "";
gxTv_SdtTransactionContext_Callerurl = "";
gxTv_SdtTransactionContext_Transactionname = "";
sTagName = "";
return ;
}
protected short readOk ;
protected short nOutParmCount ;
protected String sTagName ;
protected bool gxTv_SdtTransactionContext_Callerondelete ;
protected String gxTv_SdtTransactionContext_Callerobject ;
protected String gxTv_SdtTransactionContext_Callerurl ;
protected String gxTv_SdtTransactionContext_Transactionname ;
[ObjectCollection(ItemType=typeof( SdtTransactionContext_Attribute ))]
protected IGxCollection gxTv_SdtTransactionContext_Attributes=null ;
}
[DataContract(Name = @"TransactionContext", Namespace = "CalcularPeajes")]
public class SdtTransactionContext_RESTInterface : GxGenericCollectionItem<SdtTransactionContext>, System.Web.SessionState.IRequiresSessionState
{
public SdtTransactionContext_RESTInterface( ) : base()
{
}
public SdtTransactionContext_RESTInterface( SdtTransactionContext psdt ) : base(psdt)
{
}
[DataMember( Name = "CallerObject" , Order = 0 )]
public String gxTpr_Callerobject
{
get {
return sdt.gxTpr_Callerobject ;
}
set {
sdt.gxTpr_Callerobject = (String)(value);
}
}
[DataMember( Name = "CallerOnDelete" , Order = 1 )]
public bool gxTpr_Callerondelete
{
get {
return sdt.gxTpr_Callerondelete ;
}
set {
sdt.gxTpr_Callerondelete = value;
}
}
[DataMember( Name = "CallerURL" , Order = 2 )]
public String gxTpr_Callerurl
{
get {
return sdt.gxTpr_Callerurl ;
}
set {
sdt.gxTpr_Callerurl = (String)(value);
}
}
[DataMember( Name = "TransactionName" , Order = 3 )]
public String gxTpr_Transactionname
{
get {
return sdt.gxTpr_Transactionname ;
}
set {
sdt.gxTpr_Transactionname = (String)(value);
}
}
[DataMember( Name = "Attributes" , Order = 4 )]
public GxGenericCollection<SdtTransactionContext_Attribute_RESTInterface> gxTpr_Attributes
{
get {
return new GxGenericCollection<SdtTransactionContext_Attribute_RESTInterface>(sdt.gxTpr_Attributes) ;
}
set {
value.LoadCollection(sdt.gxTpr_Attributes);
}
}
public SdtTransactionContext sdt
{
get {
return (SdtTransactionContext)Sdt ;
}
set {
Sdt = value ;
}
}
[OnDeserializing]
void checkSdt( StreamingContext ctx )
{
if ( sdt == null )
{
sdt = new SdtTransactionContext() ;
}
}
}
}