Check for cancellation more often in generator

このコミットが含まれているのは:
Sergio Pedri committed 2024-10-17 21:41:03 -07:00
1 親 3f4d59e981
コミット 57f1d3902b
1ファイル変更
+10
+10
ファイルの表示
@@ -39,10 +39,20 @@ public sealed partial class CanvasEffectPropertyGenerator : IIncrementalGenerato
return default;
}
token.ThrowIfCancellationRequested();
string typeNameWithNullabilityAnnotations = propertySymbol.Type.GetFullyQualifiedNameWithNullabilityAnnotations();
token.ThrowIfCancellationRequested();
bool isOldPropertyValueDirectlyReferenced = Execute.IsOldPropertyValueDirectlyReferenced(propertySymbol);
token.ThrowIfCancellationRequested();
CanvasEffectInvalidationType invalidationType = Execute.GetCanvasEffectInvalidationType(context.Attributes[0]);
token.ThrowIfCancellationRequested();
// We're using IsValueType here and not IsReferenceType to also cover unconstrained type parameter cases.
// This will cover both reference types as well T when the constraints are not struct or unmanaged.
// If this is true, it means the field storage can potentially be in a null state (even if not annotated).