コード例 #1
0
 private bool ReferencesGson(MetadataTypes metadata)
 {
     return(metadata.GetAllMetadataTypes()
            .Any(x => x.Properties.Safe().Any(p => JavaGeneratorExtensions.JavaKeyWords.Contains(p.Name.PropertyStyle())) ||
                 x.Properties.Safe().Any(p => p.DataMember?.Name != null) ||
                 (x.ReturnMarkerTypeName != null && x.ReturnMarkerTypeName.Name.IndexOf('`') >= 0) //uses TypeToken<T>
                 ));
 }
コード例 #2
0
 private static bool ReferencesStream(MetadataTypes metadata)
 {
     return(metadata.GetAllMetadataTypes().Any(x => x.Name == "Stream" && x.Namespace == "System.IO"));
 }
コード例 #3
0
 private bool ReferencesGson(MetadataTypes metadata)
 {
     return(metadata.GetAllMetadataTypes().Any(x => KotlinGeneratorExtensions.KotlinKeyWords.Contains(x.Name) ||
                                               x.Properties.Safe().Any(p => p.DataMember != null && p.DataMember.Name != null) ||
                                               (x.ReturnMarkerTypeName != null && x.ReturnMarkerTypeName.Name.IndexOf('`') >= 0))); //uses TypeToken<T>
 }