diff --git a/src/BlueWest.MapTo/Extensions/CommonSource.cs b/src/BlueWest.MapTo/Extensions/CommonSource.cs index 4553839..ee18ed0 100644 --- a/src/BlueWest.MapTo/Extensions/CommonSource.cs +++ b/src/BlueWest.MapTo/Extensions/CommonSource.cs @@ -6,6 +6,7 @@ using System.Text; using System.Collections.Immutable; using System.Diagnostics; using Microsoft.CodeAnalysis; +#pragma warning disable CS8602 namespace MapTo.Extensions { @@ -207,7 +208,9 @@ namespace MapTo.Extensions private static void HandleEnumerable(SourceBuilder builder, MappedMember property) { var symbol = property.ActualSymbol as IPropertySymbol; +#pragma warning disable CS8602 builder.WriteCommentArray(symbol.Parameters, nameof(symbol.Parameters)); +#pragma warning restore CS8602 builder.WriteCommentArray(symbol.TypeCustomModifiers, nameof(symbol.TypeCustomModifiers)); builder.WriteComment($"Is enumerable {(property.ActualSymbol as IPropertySymbol).Parameters}"); diff --git a/src/BlueWest.MapTo/MappingContext.cs b/src/BlueWest.MapTo/MappingContext.cs index 1f02b39..7d53c76 100644 --- a/src/BlueWest.MapTo/MappingContext.cs +++ b/src/BlueWest.MapTo/MappingContext.cs @@ -6,6 +6,7 @@ using MapTo.Extensions; using MapTo.Sources; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +#pragma warning disable CS8602 namespace MapTo { @@ -52,7 +53,7 @@ namespace MapTo protected INamedTypeSymbol UseUpdateAttributeTypeSymbol { get; } - public static INamedTypeSymbol JsonExtensionAttributeSymbol { get; set; } + public static INamedTypeSymbol JsonExtensionAttributeSymbol { get; set; } = null!; protected INamedTypeSymbol MappingContextTypeSymbol { get; } @@ -269,7 +270,7 @@ namespace MapTo return new MappedMember( property.Name, - property.GetTypeSymbol().ToString(), + property.GetTypeSymbol()?.ToString() ?? throw new InvalidOperationException(), ToQualifiedDisplayName(propertyType) ?? propertyType.Name, converterFullyQualifiedName, converterParameters.ToImmutableArray(), @@ -315,7 +316,9 @@ namespace MapTo property, namedType, isEnumerable, - (property as IPropertySymbol).IsReadOnly); +#pragma warning disable CS8602 + (property as IPropertySymbol).IsReadOnly); +#pragma warning restore CS8602 ; } diff --git a/src/BlueWest.MapTo/Sources/UpdateDataAttributeSource.cs b/src/BlueWest.MapTo/Sources/UpdateDataAttributeSource.cs index 1bf082c..9b04d4c 100644 --- a/src/BlueWest.MapTo/Sources/UpdateDataAttributeSource.cs +++ b/src/BlueWest.MapTo/Sources/UpdateDataAttributeSource.cs @@ -2,6 +2,9 @@ using static MapTo.Sources.Constants; namespace MapTo.Sources { + /// + /// UpdateData Attribute Source + /// public class UpdateDataAttributeSource { internal const string AttributeName = "UpdateData";