Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Examples of errors detected by the...

Examples of errors detected by the V3207 diagnostic

V3207. The 'not A or B' logical pattern may not work as expected. The 'not' pattern is matched only to the first expression from the 'or' pattern.


PixiEditor

V3207 The 'not IRasterizable or ImageLayerNode' logical pattern may not work as expected. The 'not' pattern is matched only to the first expression from the 'or' pattern. CombineStructureMembersOnto_Change.cs 160


private List<IChangeInfo> ApplyToFrame(Document target,
                                       StructureNode targetLayer,
                                       int frame)
{
  ....

  foreach (var guid in ordererd)
  {
    var layer = target.FindMemberOrThrow<StructureNode>(guid);

    AddMissingKeyFrame(targetLayer, frame, layer, changes, target);

    if (layer is not IRasterizable or ImageLayerNode)
      continue;

    if (layer is ImageLayerNode imageLayerNode)
    {
      ....
    }
        ....
    }
}

Files

V3207 The 'not 0 or 1' logical pattern may not work as expected. The 'not' pattern is matched only to the first expression from the 'or' pattern. Files.App.Controls Omnibar.cs 149


protected void ChangeMode(OmnibarMode? oldMode, OmnibarMode newMode)
{
  ....
  var modeSeparatorWidth =
    itemCount is not 0 or 1
      ? _modesHostGrid.Children[1] is FrameworkElement frameworkElement
        ? frameworkElement.ActualWidth
        : 0
      : 0;
  ....
}