|
1 | | -using System; |
| 1 | +using System; |
2 | 2 | using System.Collections.Concurrent; |
3 | 3 | using Microsoft.CodeAnalysis; |
4 | 4 | using Microsoft.CodeAnalysis.CSharp; |
|
7 | 7 | using System.Collections.Generic; |
8 | 8 | using System.Collections.Immutable; |
9 | 9 | using System.Linq; |
10 | | -using System.Reflection; |
11 | | -using System.Reflection.Metadata.Ecma335; |
12 | 10 | using System.Text; |
13 | 11 | using Microsoft.CodeAnalysis.Diagnostics; |
14 | 12 |
|
@@ -126,7 +124,7 @@ static bool HasBaseClass (ClassDeclarationSyntax classDecl) |
126 | 124 | var currentType = classSymbol; |
127 | 125 | while (currentType != null) { |
128 | 126 | foreach (var member in currentType.GetMembers ().OfType<IPropertySymbol> ()) { |
129 | | - if (!member.IsReadOnly) { |
| 127 | + if (!member.IsReadOnly && !member.IsStatic && !member.IsIndexer && (member.DeclaredAccessibility != Accessibility.Private && member.DeclaredAccessibility != Accessibility.Protected) ) { |
130 | 128 | var ignore = member.GetAttributes () |
131 | 129 | .Any (attr => IsIgnoreAttribute (attr.AttributeClass)); |
132 | 130 |
|
@@ -344,13 +342,16 @@ static void Execute( |
344 | 342 | sb.AppendLine("// <auto-generated />"); |
345 | 343 | sb.AppendLine("using System;"); |
346 | 344 | sb.AppendLine("using SQLite;"); |
347 | | - sb.AppendLine(); |
| 345 | + sb.AppendLine("#pragma warning disable CS0618 // Disable obsolete Warnings"); |
| 346 | + sb.AppendLine(); |
348 | 347 | sb.AppendLine($"namespace {rootNamespace}"); |
349 | 348 | sb.AppendLine("{"); |
350 | | - sb.AppendLine(" [SQLite.Preserve(AllMembers = true)]"); |
| 349 | + sb.AppendLine(" /// <summary> SQLite Initializer Class </summary>"); |
| 350 | + sb.AppendLine(" [SQLite.Preserve(AllMembers = true)]"); |
351 | 351 | sb.AppendLine(" public static class SQLiteInitializer"); |
352 | 352 | sb.AppendLine(" {"); |
353 | 353 | sb.AppendLine(" private static bool initialized;"); |
| 354 | + sb.AppendLine(" /// <summary> Init SQLite Fast Column Setters </summary>"); |
354 | 355 | sb.AppendLine("#if NET5_0_OR_GREATER"); |
355 | 356 | sb.AppendLine(" [System.Runtime.CompilerServices.ModuleInitializer]"); |
356 | 357 | sb.AppendLine("#endif"); |
|
0 commit comments