@@ -36,7 +36,7 @@ namespace UtBot.Rd.Generated
36
36
37
37
38
38
/// <summary>
39
- /// <p>Generated from: CSharpModel.kt:7 </p>
39
+ /// <p>Generated from: CSharpModel.kt:8 </p>
40
40
/// </summary>
41
41
public class VSharpModel : RdExtBase
42
42
{
@@ -76,7 +76,7 @@ private VSharpModel (
76
76
77
77
78
78
79
- protected override long SerializationHash => - 3661028246701070338L ;
79
+ protected override long SerializationHash => - 2362293640438957269L ;
80
80
81
81
protected override Action < ISerializers > Register => RegisterDeclaredTypesSerializers ;
82
82
public static void RegisterDeclaredTypesSerializers ( ISerializers serializers )
@@ -118,7 +118,7 @@ public override string ToString()
118
118
119
119
120
120
/// <summary>
121
- /// <p>Generated from: CSharpModel.kt:8 </p>
121
+ /// <p>Generated from: CSharpModel.kt:14 </p>
122
122
/// </summary>
123
123
public sealed class GenerateArguments : IPrintable , IEquatable < GenerateArguments >
124
124
{
@@ -127,43 +127,43 @@ public sealed class GenerateArguments : IPrintable, IEquatable<GenerateArguments
127
127
[ NotNull ] public string AssemblyPath { get ; private set ; }
128
128
[ NotNull ] public string ProjectCsprojPath { get ; private set ; }
129
129
[ NotNull ] public string SolutionFilePath { get ; private set ; }
130
- [ NotNull ] public string ModuleFqnName { get ; private set ; }
131
- public int MethodToken { get ; private set ; }
130
+ [ NotNull ] public MethodDescriptor Method { get ; private set ; }
132
131
public int GenerationTimeoutInSeconds { get ; private set ; }
132
+ [ CanBeNull ] public string TargetFramework { get ; private set ; }
133
133
134
134
//private fields
135
135
//primary constructor
136
136
public GenerateArguments (
137
137
[ NotNull ] string assemblyPath ,
138
138
[ NotNull ] string projectCsprojPath ,
139
139
[ NotNull ] string solutionFilePath ,
140
- [ NotNull ] string moduleFqnName ,
141
- int methodToken ,
142
- int generationTimeoutInSeconds
140
+ [ NotNull ] MethodDescriptor method ,
141
+ int generationTimeoutInSeconds ,
142
+ [ CanBeNull ] string targetFramework
143
143
)
144
144
{
145
145
if ( assemblyPath == null ) throw new ArgumentNullException ( "assemblyPath" ) ;
146
146
if ( projectCsprojPath == null ) throw new ArgumentNullException ( "projectCsprojPath" ) ;
147
147
if ( solutionFilePath == null ) throw new ArgumentNullException ( "solutionFilePath" ) ;
148
- if ( moduleFqnName == null ) throw new ArgumentNullException ( "moduleFqnName " ) ;
148
+ if ( method == null ) throw new ArgumentNullException ( "method " ) ;
149
149
150
150
AssemblyPath = assemblyPath ;
151
151
ProjectCsprojPath = projectCsprojPath ;
152
152
SolutionFilePath = solutionFilePath ;
153
- ModuleFqnName = moduleFqnName ;
154
- MethodToken = methodToken ;
153
+ Method = method ;
155
154
GenerationTimeoutInSeconds = generationTimeoutInSeconds ;
155
+ TargetFramework = targetFramework ;
156
156
}
157
157
//secondary constructor
158
158
//deconstruct trait
159
- public void Deconstruct ( [ NotNull ] out string assemblyPath , [ NotNull ] out string projectCsprojPath , [ NotNull ] out string solutionFilePath , [ NotNull ] out string moduleFqnName , out int methodToken , out int generationTimeoutInSeconds )
159
+ public void Deconstruct ( [ NotNull ] out string assemblyPath , [ NotNull ] out string projectCsprojPath , [ NotNull ] out string solutionFilePath , [ NotNull ] out MethodDescriptor method , out int generationTimeoutInSeconds , [ CanBeNull ] out string targetFramework )
160
160
{
161
161
assemblyPath = AssemblyPath ;
162
162
projectCsprojPath = ProjectCsprojPath ;
163
163
solutionFilePath = SolutionFilePath ;
164
- moduleFqnName = ModuleFqnName ;
165
- methodToken = MethodToken ;
164
+ method = Method ;
166
165
generationTimeoutInSeconds = GenerationTimeoutInSeconds ;
166
+ targetFramework = TargetFramework ;
167
167
}
168
168
//statics
169
169
@@ -172,22 +172,24 @@ public void Deconstruct([NotNull] out string assemblyPath, [NotNull] out string
172
172
var assemblyPath = reader . ReadString ( ) ;
173
173
var projectCsprojPath = reader . ReadString ( ) ;
174
174
var solutionFilePath = reader . ReadString ( ) ;
175
- var moduleFqnName = reader . ReadString ( ) ;
176
- var methodToken = reader . ReadInt ( ) ;
175
+ var method = MethodDescriptor . Read ( ctx , reader ) ;
177
176
var generationTimeoutInSeconds = reader . ReadInt ( ) ;
178
- var _result = new GenerateArguments ( assemblyPath , projectCsprojPath , solutionFilePath , moduleFqnName , methodToken , generationTimeoutInSeconds ) ;
177
+ var targetFramework = ReadStringNullable ( ctx , reader ) ;
178
+ var _result = new GenerateArguments ( assemblyPath , projectCsprojPath , solutionFilePath , method , generationTimeoutInSeconds , targetFramework ) ;
179
179
return _result ;
180
180
} ;
181
+ public static CtxReadDelegate < string > ReadStringNullable = JetBrains . Rd . Impl . Serializers . ReadString . NullableClass ( ) ;
181
182
182
183
public static CtxWriteDelegate < GenerateArguments > Write = ( ctx , writer , value ) =>
183
184
{
184
185
writer . Write ( value . AssemblyPath ) ;
185
186
writer . Write ( value . ProjectCsprojPath ) ;
186
187
writer . Write ( value . SolutionFilePath ) ;
187
- writer . Write ( value . ModuleFqnName ) ;
188
- writer . Write ( value . MethodToken ) ;
188
+ MethodDescriptor . Write ( ctx , writer , value . Method ) ;
189
189
writer . Write ( value . GenerationTimeoutInSeconds ) ;
190
+ WriteStringNullable ( ctx , writer , value . TargetFramework ) ;
190
191
} ;
192
+ public static CtxWriteDelegate < string > WriteStringNullable = JetBrains . Rd . Impl . Serializers . WriteString . NullableClass ( ) ;
191
193
192
194
//constants
193
195
@@ -205,7 +207,7 @@ public bool Equals(GenerateArguments other)
205
207
{
206
208
if ( ReferenceEquals ( null , other ) ) return false ;
207
209
if ( ReferenceEquals ( this , other ) ) return true ;
208
- return AssemblyPath == other . AssemblyPath && ProjectCsprojPath == other . ProjectCsprojPath && SolutionFilePath == other . SolutionFilePath && ModuleFqnName == other . ModuleFqnName && MethodToken == other . MethodToken && GenerationTimeoutInSeconds == other . GenerationTimeoutInSeconds ;
210
+ return AssemblyPath == other . AssemblyPath && ProjectCsprojPath == other . ProjectCsprojPath && SolutionFilePath == other . SolutionFilePath && Equals ( Method , other . Method ) && GenerationTimeoutInSeconds == other . GenerationTimeoutInSeconds && Equals ( TargetFramework , other . TargetFramework ) ;
209
211
}
210
212
//hash code trait
211
213
public override int GetHashCode ( )
@@ -215,9 +217,9 @@ public override int GetHashCode()
215
217
hash = hash * 31 + AssemblyPath . GetHashCode ( ) ;
216
218
hash = hash * 31 + ProjectCsprojPath . GetHashCode ( ) ;
217
219
hash = hash * 31 + SolutionFilePath . GetHashCode ( ) ;
218
- hash = hash * 31 + ModuleFqnName . GetHashCode ( ) ;
219
- hash = hash * 31 + MethodToken . GetHashCode ( ) ;
220
+ hash = hash * 31 + Method . GetHashCode ( ) ;
220
221
hash = hash * 31 + GenerationTimeoutInSeconds . GetHashCode ( ) ;
222
+ hash = hash * 31 + ( TargetFramework != null ? TargetFramework . GetHashCode ( ) : 0 ) ;
221
223
return hash ;
222
224
}
223
225
}
@@ -229,9 +231,9 @@ public void Print(PrettyPrinter printer)
229
231
printer . Print ( "assemblyPath = " ) ; AssemblyPath . PrintEx ( printer ) ; printer . Println ( ) ;
230
232
printer . Print ( "projectCsprojPath = " ) ; ProjectCsprojPath . PrintEx ( printer ) ; printer . Println ( ) ;
231
233
printer . Print ( "solutionFilePath = " ) ; SolutionFilePath . PrintEx ( printer ) ; printer . Println ( ) ;
232
- printer . Print ( "moduleFqnName = " ) ; ModuleFqnName . PrintEx ( printer ) ; printer . Println ( ) ;
233
- printer . Print ( "methodToken = " ) ; MethodToken . PrintEx ( printer ) ; printer . Println ( ) ;
234
+ printer . Print ( "method = " ) ; Method . PrintEx ( printer ) ; printer . Println ( ) ;
234
235
printer . Print ( "generationTimeoutInSeconds = " ) ; GenerationTimeoutInSeconds . PrintEx ( printer ) ; printer . Println ( ) ;
236
+ printer . Print ( "targetFramework = " ) ; TargetFramework . PrintEx ( printer ) ; printer . Println ( ) ;
235
237
}
236
238
printer . Print ( ")" ) ;
237
239
}
@@ -246,52 +248,66 @@ public override string ToString()
246
248
247
249
248
250
/// <summary>
249
- /// <p>Generated from: CSharpModel.kt:17 </p>
251
+ /// <p>Generated from: CSharpModel.kt:23 </p>
250
252
/// </summary>
251
253
public sealed class GenerateResults : IPrintable , IEquatable < GenerateResults >
252
254
{
253
255
//fields
254
256
//public fields
257
+ public bool IsGenerated { get ; private set ; }
255
258
[ NotNull ] public string GeneratedProjectPath { get ; private set ; }
256
259
[ NotNull ] public string [ ] GeneratedFilesPaths { get ; private set ; }
260
+ [ CanBeNull ] public string ExceptionMessage { get ; private set ; }
257
261
258
262
//private fields
259
263
//primary constructor
260
264
public GenerateResults (
265
+ bool isGenerated ,
261
266
[ NotNull ] string generatedProjectPath ,
262
- [ NotNull ] string [ ] generatedFilesPaths
267
+ [ NotNull ] string [ ] generatedFilesPaths ,
268
+ [ CanBeNull ] string exceptionMessage
263
269
)
264
270
{
265
271
if ( generatedProjectPath == null ) throw new ArgumentNullException ( "generatedProjectPath" ) ;
266
272
if ( generatedFilesPaths == null ) throw new ArgumentNullException ( "generatedFilesPaths" ) ;
267
273
274
+ IsGenerated = isGenerated ;
268
275
GeneratedProjectPath = generatedProjectPath ;
269
276
GeneratedFilesPaths = generatedFilesPaths ;
277
+ ExceptionMessage = exceptionMessage ;
270
278
}
271
279
//secondary constructor
272
280
//deconstruct trait
273
- public void Deconstruct ( [ NotNull ] out string generatedProjectPath , [ NotNull ] out string [ ] generatedFilesPaths )
281
+ public void Deconstruct ( out bool isGenerated , [ NotNull ] out string generatedProjectPath , [ NotNull ] out string [ ] generatedFilesPaths , [ CanBeNull ] out string exceptionMessage )
274
282
{
283
+ isGenerated = IsGenerated ;
275
284
generatedProjectPath = GeneratedProjectPath ;
276
285
generatedFilesPaths = GeneratedFilesPaths ;
286
+ exceptionMessage = ExceptionMessage ;
277
287
}
278
288
//statics
279
289
280
290
public static CtxReadDelegate < GenerateResults > Read = ( ctx , reader ) =>
281
291
{
292
+ var isGenerated = reader . ReadBool ( ) ;
282
293
var generatedProjectPath = reader . ReadString ( ) ;
283
294
var generatedFilesPaths = ReadStringArray ( ctx , reader ) ;
284
- var _result = new GenerateResults ( generatedProjectPath , generatedFilesPaths ) ;
295
+ var exceptionMessage = ReadStringNullable ( ctx , reader ) ;
296
+ var _result = new GenerateResults ( isGenerated , generatedProjectPath , generatedFilesPaths , exceptionMessage ) ;
285
297
return _result ;
286
298
} ;
287
299
public static CtxReadDelegate < string [ ] > ReadStringArray = JetBrains . Rd . Impl . Serializers . ReadString . Array ( ) ;
300
+ public static CtxReadDelegate < string > ReadStringNullable = JetBrains . Rd . Impl . Serializers . ReadString . NullableClass ( ) ;
288
301
289
302
public static CtxWriteDelegate < GenerateResults > Write = ( ctx , writer , value ) =>
290
303
{
304
+ writer . Write ( value . IsGenerated ) ;
291
305
writer . Write ( value . GeneratedProjectPath ) ;
292
306
WriteStringArray ( ctx , writer , value . GeneratedFilesPaths ) ;
307
+ WriteStringNullable ( ctx , writer , value . ExceptionMessage ) ;
293
308
} ;
294
309
public static CtxWriteDelegate < string [ ] > WriteStringArray = JetBrains . Rd . Impl . Serializers . WriteString . Array ( ) ;
310
+ public static CtxWriteDelegate < string > WriteStringNullable = JetBrains . Rd . Impl . Serializers . WriteString . NullableClass ( ) ;
295
311
296
312
//constants
297
313
@@ -309,15 +325,17 @@ public bool Equals(GenerateResults other)
309
325
{
310
326
if ( ReferenceEquals ( null , other ) ) return false ;
311
327
if ( ReferenceEquals ( this , other ) ) return true ;
312
- return GeneratedProjectPath == other . GeneratedProjectPath && GeneratedFilesPaths . SequenceEqual ( other . GeneratedFilesPaths ) ;
328
+ return IsGenerated == other . IsGenerated && GeneratedProjectPath == other . GeneratedProjectPath && GeneratedFilesPaths . SequenceEqual ( other . GeneratedFilesPaths ) && Equals ( ExceptionMessage , other . ExceptionMessage ) ;
313
329
}
314
330
//hash code trait
315
331
public override int GetHashCode ( )
316
332
{
317
333
unchecked {
318
334
var hash = 0 ;
335
+ hash = hash * 31 + IsGenerated . GetHashCode ( ) ;
319
336
hash = hash * 31 + GeneratedProjectPath . GetHashCode ( ) ;
320
337
hash = hash * 31 + GeneratedFilesPaths . ContentHashCode ( ) ;
338
+ hash = hash * 31 + ( ExceptionMessage != null ? ExceptionMessage . GetHashCode ( ) : 0 ) ;
321
339
return hash ;
322
340
}
323
341
}
@@ -326,8 +344,104 @@ public void Print(PrettyPrinter printer)
326
344
{
327
345
printer . Println ( "GenerateResults (" ) ;
328
346
using ( printer . IndentCookie ( ) ) {
347
+ printer . Print ( "isGenerated = " ) ; IsGenerated . PrintEx ( printer ) ; printer . Println ( ) ;
329
348
printer . Print ( "generatedProjectPath = " ) ; GeneratedProjectPath . PrintEx ( printer ) ; printer . Println ( ) ;
330
349
printer . Print ( "generatedFilesPaths = " ) ; GeneratedFilesPaths . PrintEx ( printer ) ; printer . Println ( ) ;
350
+ printer . Print ( "exceptionMessage = " ) ; ExceptionMessage . PrintEx ( printer ) ; printer . Println ( ) ;
351
+ }
352
+ printer . Print ( ")" ) ;
353
+ }
354
+ //toString
355
+ public override string ToString ( )
356
+ {
357
+ var printer = new SingleLinePrettyPrinter ( ) ;
358
+ Print ( printer ) ;
359
+ return printer . ToString ( ) ;
360
+ }
361
+ }
362
+
363
+
364
+ /// <summary>
365
+ /// <p>Generated from: CSharpModel.kt:9</p>
366
+ /// </summary>
367
+ public sealed class MethodDescriptor : IPrintable , IEquatable < MethodDescriptor >
368
+ {
369
+ //fields
370
+ //public fields
371
+ [ NotNull ] public string MethodName { get ; private set ; }
372
+ [ NotNull ] public string TypeName { get ; private set ; }
373
+
374
+ //private fields
375
+ //primary constructor
376
+ public MethodDescriptor (
377
+ [ NotNull ] string methodName ,
378
+ [ NotNull ] string typeName
379
+ )
380
+ {
381
+ if ( methodName == null ) throw new ArgumentNullException ( "methodName" ) ;
382
+ if ( typeName == null ) throw new ArgumentNullException ( "typeName" ) ;
383
+
384
+ MethodName = methodName ;
385
+ TypeName = typeName ;
386
+ }
387
+ //secondary constructor
388
+ //deconstruct trait
389
+ public void Deconstruct ( [ NotNull ] out string methodName , [ NotNull ] out string typeName )
390
+ {
391
+ methodName = MethodName ;
392
+ typeName = TypeName ;
393
+ }
394
+ //statics
395
+
396
+ public static CtxReadDelegate < MethodDescriptor > Read = ( ctx , reader ) =>
397
+ {
398
+ var methodName = reader . ReadString ( ) ;
399
+ var typeName = reader . ReadString ( ) ;
400
+ var _result = new MethodDescriptor ( methodName , typeName ) ;
401
+ return _result ;
402
+ } ;
403
+
404
+ public static CtxWriteDelegate < MethodDescriptor > Write = ( ctx , writer , value ) =>
405
+ {
406
+ writer . Write ( value . MethodName ) ;
407
+ writer . Write ( value . TypeName ) ;
408
+ } ;
409
+
410
+ //constants
411
+
412
+ //custom body
413
+ //methods
414
+ //equals trait
415
+ public override bool Equals ( object obj )
416
+ {
417
+ if ( ReferenceEquals ( null , obj ) ) return false ;
418
+ if ( ReferenceEquals ( this , obj ) ) return true ;
419
+ if ( obj . GetType ( ) != GetType ( ) ) return false ;
420
+ return Equals ( ( MethodDescriptor ) obj ) ;
421
+ }
422
+ public bool Equals ( MethodDescriptor other )
423
+ {
424
+ if ( ReferenceEquals ( null , other ) ) return false ;
425
+ if ( ReferenceEquals ( this , other ) ) return true ;
426
+ return MethodName == other . MethodName && TypeName == other . TypeName ;
427
+ }
428
+ //hash code trait
429
+ public override int GetHashCode ( )
430
+ {
431
+ unchecked {
432
+ var hash = 0 ;
433
+ hash = hash * 31 + MethodName . GetHashCode ( ) ;
434
+ hash = hash * 31 + TypeName . GetHashCode ( ) ;
435
+ return hash ;
436
+ }
437
+ }
438
+ //pretty print
439
+ public void Print ( PrettyPrinter printer )
440
+ {
441
+ printer . Println ( "MethodDescriptor (" ) ;
442
+ using ( printer . IndentCookie ( ) ) {
443
+ printer . Print ( "methodName = " ) ; MethodName . PrintEx ( printer ) ; printer . Println ( ) ;
444
+ printer . Print ( "typeName = " ) ; TypeName . PrintEx ( printer ) ; printer . Println ( ) ;
331
445
}
332
446
printer . Print ( ")" ) ;
333
447
}
0 commit comments