|
| 1 | + |
| 2 | + |
| 3 | +// suppress "Missing XML comment for publicly visible type or member" |
| 4 | +#pragma warning disable 1591 |
| 5 | + |
| 6 | + |
| 7 | +#region ReSharper warnings |
| 8 | +// ReSharper disable PartialTypeWithSinglePart |
| 9 | +// ReSharper disable RedundantNameQualifier |
| 10 | +// ReSharper disable InconsistentNaming |
| 11 | +// ReSharper disable CheckNamespace |
| 12 | +// ReSharper disable UnusedParameter.Local |
| 13 | +// ReSharper disable RedundantUsingDirective |
| 14 | +#endregion |
| 15 | + |
| 16 | +namespace Test |
| 17 | +{ |
| 18 | + using System.Collections.Generic; |
| 19 | + |
| 20 | + [System.CodeDom.Compiler.GeneratedCode("gbc", "0.12.1.0")] |
| 21 | + public enum TestEnum |
| 22 | + { |
| 23 | + EnumVal1, |
| 24 | + EnumVal2, |
| 25 | + EnumVal3, |
| 26 | + } |
| 27 | + |
| 28 | + [global::Bond.Schema] |
| 29 | + [System.CodeDom.Compiler.GeneratedCode("gbc", "0.12.1.0")] |
| 30 | + public partial class Simple |
| 31 | + { |
| 32 | + [global::Bond.Id(0)] |
| 33 | + public int someInt { get; init; } |
| 34 | + |
| 35 | + [global::Bond.Id(1)] |
| 36 | + public int anotherInt { get; init; } |
| 37 | + |
| 38 | + [global::Bond.Id(2), global::Bond.Type(typeof(global::Bond.Tag.wstring))] |
| 39 | + public string someString { get; init; } |
| 40 | + |
| 41 | + public Simple( |
| 42 | + int someInt, |
| 43 | + int anotherInt, |
| 44 | + string someString) |
| 45 | + { |
| 46 | + this.someInt = someInt; |
| 47 | + this.anotherInt = anotherInt; |
| 48 | + this.someString = someString; |
| 49 | + } |
| 50 | + |
| 51 | + public Simple() |
| 52 | + { |
| 53 | + someString = ""; |
| 54 | + } |
| 55 | + } |
| 56 | + |
| 57 | + [global::Bond.Schema] |
| 58 | + [System.CodeDom.Compiler.GeneratedCode("gbc", "0.12.1.0")] |
| 59 | + public partial class Foo |
| 60 | + { |
| 61 | + [global::Bond.Id(0), global::Bond.Type(typeof(global::Bond.Tag.wstring))] |
| 62 | + public string someText { get; init; } |
| 63 | + |
| 64 | + public Foo( |
| 65 | + string someText) |
| 66 | + { |
| 67 | + this.someText = someText; |
| 68 | + } |
| 69 | + |
| 70 | + public Foo() |
| 71 | + { |
| 72 | + someText = "BaseText1"; |
| 73 | + } |
| 74 | + } |
| 75 | + |
| 76 | + [global::Bond.Schema] |
| 77 | + [System.CodeDom.Compiler.GeneratedCode("gbc", "0.12.1.0")] |
| 78 | + public partial class Bar |
| 79 | + : Foo |
| 80 | + { |
| 81 | + [global::Bond.Id(0)] |
| 82 | + public TestEnum testEnum { get; init; } |
| 83 | + |
| 84 | + [global::Bond.Id(1), global::Bond.Type(typeof(global::Bond.Tag.wstring))] |
| 85 | + new public string someText { get; init; } |
| 86 | + |
| 87 | + [global::Bond.Id(2)] |
| 88 | + public int someInt { get; init; } |
| 89 | + |
| 90 | + [global::Bond.Id(3), global::Bond.Type(typeof(global::Bond.Tag.wstring))] |
| 91 | + public string moreText { get; init; } |
| 92 | + |
| 93 | + [global::Bond.Id(4), global::Bond.Type(typeof(List<Simple>))] |
| 94 | + public IList<Simple> someList { get; init; } |
| 95 | + |
| 96 | + [global::Bond.Id(5), global::Bond.Type(typeof(Dictionary<global::Bond.Tag.wstring, double>))] |
| 97 | + public IDictionary<string, double> someMap { get; init; } |
| 98 | + |
| 99 | + [global::Bond.Id(6), global::Bond.Type(typeof(HashSet<global::Bond.Tag.wstring>))] |
| 100 | + public ISet<string> someSet { get; init; } |
| 101 | + |
| 102 | + public Bar( |
| 103 | + // Base class parameters |
| 104 | + string someText, |
| 105 | + |
| 106 | + // This class parameters |
| 107 | + TestEnum testEnum, |
| 108 | + string someText0, |
| 109 | + int someInt, |
| 110 | + string moreText, |
| 111 | + IList<Simple> someList, |
| 112 | + IDictionary<string, double> someMap, |
| 113 | + ISet<string> someSet |
| 114 | + ) : base( |
| 115 | + someText) |
| 116 | + { |
| 117 | + this.testEnum = testEnum; |
| 118 | + this.someText = someText0; |
| 119 | + this.someInt = someInt; |
| 120 | + this.moreText = moreText; |
| 121 | + this.someList = someList; |
| 122 | + this.someMap = someMap; |
| 123 | + this.someSet = someSet; |
| 124 | + } |
| 125 | + |
| 126 | + public Bar() |
| 127 | + { |
| 128 | + testEnum = TestEnum.Val2; |
| 129 | + someText = "DerivedText1"; |
| 130 | + moreText = ""; |
| 131 | + someList = new List<Simple>(); |
| 132 | + someMap = new Dictionary<string, double>(); |
| 133 | + someSet = new HashSet<string>(); |
| 134 | + } |
| 135 | + } |
| 136 | + |
| 137 | + [global::Bond.Schema] |
| 138 | + [System.CodeDom.Compiler.GeneratedCode("gbc", "0.12.1.0")] |
| 139 | + public partial class Baz |
| 140 | + : Bar |
| 141 | + { |
| 142 | + [global::Bond.Id(0), global::Bond.Type(typeof(global::Bond.Tag.wstring))] |
| 143 | + new public string someText { get; init; } |
| 144 | + |
| 145 | + [global::Bond.Id(1), global::Bond.Type(typeof(global::Bond.Tag.wstring))] |
| 146 | + public string evenMoreText { get; init; } |
| 147 | + |
| 148 | + [global::Bond.Id(2), global::Bond.Type(typeof(global::Bond.Tag.wstring))] |
| 149 | + public string someText1 { get; init; } |
| 150 | + |
| 151 | + public Baz( |
| 152 | + // Base class parameters |
| 153 | + string someText, |
| 154 | + TestEnum testEnum, |
| 155 | + string someText0, |
| 156 | + int someInt, |
| 157 | + string moreText, |
| 158 | + IList<Simple> someList, |
| 159 | + IDictionary<string, double> someMap, |
| 160 | + ISet<string> someSet, |
| 161 | + |
| 162 | + // This class parameters |
| 163 | + string someText1, |
| 164 | + string evenMoreText, |
| 165 | + string someText10 |
| 166 | + ) : base( |
| 167 | + someText, |
| 168 | + testEnum, |
| 169 | + someText0, |
| 170 | + someInt, |
| 171 | + moreText, |
| 172 | + someList, |
| 173 | + someMap, |
| 174 | + someSet) |
| 175 | + { |
| 176 | + this.someText = someText1; |
| 177 | + this.evenMoreText = evenMoreText; |
| 178 | + this.someText1 = someText10; |
| 179 | + } |
| 180 | + |
| 181 | + public Baz() |
| 182 | + { |
| 183 | + someText = ""; |
| 184 | + evenMoreText = ""; |
| 185 | + someText1 = ""; |
| 186 | + } |
| 187 | + } |
| 188 | + |
| 189 | + [global::Bond.Schema] |
| 190 | + [System.CodeDom.Compiler.GeneratedCode("gbc", "0.12.1.0")] |
| 191 | + public partial class DerivedEmpty |
| 192 | + : Foo |
| 193 | + { |
| 194 | + |
| 195 | + |
| 196 | + public DerivedEmpty( |
| 197 | + // Base class parameters |
| 198 | + string someText |
| 199 | + ) : base( |
| 200 | + someText) |
| 201 | + { |
| 202 | + |
| 203 | + } |
| 204 | + |
| 205 | + public DerivedEmpty() |
| 206 | + { |
| 207 | + |
| 208 | + } |
| 209 | + } |
| 210 | +} // Test |
0 commit comments