2009-11-02 Jb Evain <jbevain@novell.com>
[mcs.git] / class / System.Runtime.Serialization.Formatters.Soap / Sample.txt
blobdfa9e52a62b3f4f8c7a40aba0d3e77b9dfb9645b
1 namespace WindowsApplicationProve\r
2 {\r
3         namespace Cxxx\r
4         {\r
5                 [Serializable]\r
6                 public struct OtherStruct\r
7                 {\r
8                   public int FInt;\r
9                 }\r
11                 [Serializable]\r
12                 public struct StructSample\r
13                   {\r
14                         public int  FInt;\r
15                         public char FChar;\r
16                         public  object FObj;                    \r
17                   }\r
18         [Serializable]\r
19                 public enum EnumSample\r
20                   {\r
21                         aa,\r
22                         bb,\r
23                     cc\r
24                   }\r
26                 [Serializable]\r
27                 public delegate int DelegateProve(int i);\r
29                 [Serializable]\r
30                 public delegate void OtherDelegate();\r
32                 public interface ISample\r
33                 {\r
34                         int FirstMethod(char charParam);\r
35                 }\r
38                 [Serializable]\r
39                 public class cIntProve: ISample\r
40                 {\r
41                         public long FLongField;\r
42                         public int FirstMethod(char charParam)\r
43                         {\r
44                                 return 6;\r
45                         }\r
46                 }\r
48                 public delegate string DlgProve(int i);\r
50                 [Serializable]\r
51                 public class  cAgregationClass:BaseClass\r
52                 {\r
53                         public Char FCharField;\r
54                         public string FStr;\r
55                         public cSerializableProve Fobj;\r
56                         public ISample Fintf;                   \r
57                         //public int[][] FIntList;\r
58                         public string DlgCatcher(int i)\r
59                         {\r
60                                 return "Hello"; \r
61                         }\r
62         }\r
64                 [Serializable]\r
65                 public class BaseClass\r
66                   {\r
67                         public int FBaseint;\r
68                         public cIntProve FIntObj;\r
69                   }\r
70                 [Serializable]\r
71                 public class cXXX\r
72                 {\r
73                         public int FI;\r
74                 }\r
76                 [Serializable]\r
77                 public class cSerializableProve\r
78                 {               \r
79                         public object[]          FArrayProve;\r
80                         public object[]          FNullArray;\r
81                         //public ClassProve        FOtherAssObj;\r
82                         public cAgregationClass  FAggField;                     \r
83                         //value types\r
84                         public DelegateProve     FDelegateProve;                \r
85                         public event  OtherDelegate FEventField;                                                \r
86                         public ISample           FInterfaceField;\r
87                         public string            FStrField;\r
88                         private int              FPintField;\r
89                         public int               FIntField;\r
90                         public uint              FUintField;                    \r
91                         public short             FShortField;\r
92                         public ushort            FUShortField;\r
93                         public long              FLongField;\r
94                         public ulong             FULongField;\r
95                         public bool              FBoolField;\r
96                         public double            FDoubleField;\r
97                         public decimal           FDecimalField;\r
98                         public char              FCharField;                    \r
99                         public StructSample      FStructField;                                          \r
100                         public EnumSample        FEnumField;    \r
101                 \r
102                         public  cSerializableProve()\r
103                         {                       \r
104                                 InitReferences();\r
105                                 InitSimpleTypes();\r
106                                 InitStructs();                                                  \r
107                                 InitArray();\r
108                         }\r
110                         private void InitReferences()\r
111                         {\r
112                                 FAggField = new cAgregationClass();\r
113                                 FAggField.FCharField = 'a';\r
114                                 FAggField.FBaseint = 10;\r
115                                 FAggField.Fobj= this;                           \r
116                                 FAggField.FStr= "Hhhh";\r
117                                 FStrField= FAggField.FStr;                                                              \r
118                                 FAggField.FIntObj= new cIntProve ();\r
119                                 FInterfaceField= FAggField.FIntObj;\r
120                                 FAggField.Fintf= FInterfaceField;                                                                               \r
121                         }\r
123                         private void InitSimpleTypes()\r
124                         {\r
125                                 FArrayProve= new Object[20];\r
126                                 FPintField= 10;\r
127                                 FIntField = 6;                          \r
128                                 FUintField = 6;\r
129                                 FShortField = 6;\r
130                                 FUShortField = 6;\r
131                                 FLongField = 6;\r
132                                 FULongField = 6;\r
133                                 FDoubleField = 6;\r
134                                 FDecimalField = 5;\r
135                                 FBoolField = true;\r
136                                 FCharField = 'a';\r
137                                 FEnumField = EnumSample.aa;\r
138                         }\r
140                         private void InitStructs()\r
141                         {\r
142               FStructField= new StructSample();                          \r
143                           FStructField.FChar= 'a';\r
144               FStructField.FInt= 10;\r
145                           FStructField.FObj= this.FAggField;              \r
146                         }\r
148                         private void InitArray()\r
149                         {\r
150                                 FArrayProve[0]= new cAgregationClass();\r
151                 ((cAgregationClass)FArrayProve[0]).FStr= "Hello";\r
152                                 FArrayProve[1]= new cAgregationClass[2];\r
153                                 ((cAgregationClass[])FArrayProve[1])[0]= this.FAggField;                                \r
154                                 FArrayProve[2]= new int[][][]{new int[][]{new int[3], new int[3], new int[3]}, new int[][]{new int[3], new int[3], new int[3]}};\r
155                                 /*Fill the integer array*/\r
156                                 ((int[][][])FArrayProve[2])[1][1][1]= 10;\r
157                                 ((int[][][])FArrayProve[2])[1][1][2]= 10;\r
158                                 ((int[][][])FArrayProve[2])[1][1][0]= 10;                               \r
159                                 FArrayProve[3]= new OtherStruct();                              \r
160                                 FArrayProve[4]= 6;\r
161                                 FArrayProve[5]= true;\r
162                                 FArrayProve[6]= 2.5;\r
163                                 FArrayProve[7]= EnumSample.bb;\r
164                                 FArrayProve[8]= this.FInterfaceField;   \r
165                                 FArrayProve[9]= "Hello";\r
166                                 FArrayProve[10]= new UInt32();\r
167                                 FArrayProve[11]= new short();\r
168                                 FArrayProve[12]= new UInt16();\r
169                                 FArrayProve[13]=  new decimal();                        \r
170                                 FArrayProve[15]= new ulong();\r
171                                 FArrayProve[16]= new char();                            \r
172                                 FArrayProve[18]= null;  \r
173                         }\r
175                         public void InitDelegates()\r
176                         {             \r
177                           FDelegateProve= new DelegateProve(SIntProve);              \r
178                       FEventField= new OtherDelegate(OtherProve);\r
179                         }