Repository: Azure/azure-sdk-for-net
File: sdk/core/Azure.Core/src/DynamicData/DynamicData.Operators.cs (C#)

Code before:
﻿// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Azure.Core.Json;

namespace Azure.Core.Serialization
{
    public partial class DynamicData
    {
        // Operators that cast from DynamicData to another type
        private static readonly Dictionary<Type, MethodInfo> CastFromOperators = typeof(DynamicData)
            .GetMethods(BindingFlags.Public | BindingFlags.Static)
            .Where(method => method.Name == "op_Explicit" || method.Name == "op_Implicit")
            .ToDictionary(method => method.ReturnType);

        /// <summary>
        /// Converts the value to a <see cref="bool"/>.
        /// </summary>
        /// <param name="value">The value to convert.</param>
        public static implicit operator bool(DynamicData value)
        {
            if (value is null) return false;

            try
            {
                return value._element.GetBoolean();
            }
            catch (InvalidOperationException e)
            {
                throw new InvalidCastException(GetInvalidKindExceptionText(typeof(bool), value._element), e);
            }
        }

        /// <summary>
        /// Converts the value to a <see cref="string"/>.
        /// </summary>
        /// <param name="value">The value to convert.</param>
        public static implicit operator string?(DynamicData value)
        {
            if (value is null) return null;

            try
            {
                return value._element.GetString();
            }
            catch (InvalidOperationException e)
            {

Review comment (suggestion):
@copilot:  WTF is with the single-line here?   You're all over the place with inconsistencies.   Use the normal form.

Also, you're using `is null` here and `== null` elsewhere.   Align everythign to `is null`

Code after:
﻿// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Azure.Core.Json;

namespace Azure.Core.Serialization
{
    public partial class DynamicData
    {
        // Operators that cast from DynamicData to another type
        private static readonly Dictionary<Type, MethodInfo> CastFromOperators = typeof(DynamicData)
            .GetMethods(BindingFlags.Public | BindingFlags.Static)
            .Where(method => method.Name == "op_Explicit" || method.Name == "op_Implicit")
            .ToDictionary(method => method.ReturnType);

        /// <summary>
        /// Converts the value to a <see cref="bool"/>.
        /// </summary>
        /// <param name="value">The value to convert.</param>
        public static implicit operator bool(DynamicData? value)
        {
            if (value is null)
            {
                return false;
            }
            try
            {
                return value._element.GetBoolean();
            }
            catch (InvalidOperationException e)
            {
                throw new InvalidCastException(GetInvalidKindExceptionText(typeof(bool), value._element), e);
            }
        }

        /// <summary>
        /// Converts the value to a <see cref="string"/>.
        /// </summary>
        /// <param name="value">The value to convert.</param>
        public static implicit operator string?(DynamicData? value)
        {
            if (value is null)
            {
                return null;
            }

            try