Repository: FlaxEngine/FlaxEngine
File: Source/Editor/Surface/Archetypes/Parameters.cs (C#)

Code before:
            public void OnParamRenamed(SurfaceParameter param)
            {
                UpdateCombo();
                UpdateTitle();
            }

            /// <inheritdoc />
            public void OnParamEdited(SurfaceParameter param)
            {
                UpdateLayout();
            }

            /// <inheritdoc />
            public void OnParamDeleted(SurfaceParameter param)
            {
                // Deselect if that parameter is selected
                if ((Guid)Values[0] == param.ID)
                    _combobox.SelectedIndex = -1;

                UpdateCombo();
            }

            /// <inheritdoc />
            public bool IsParamreferenced(SurfaceParameter param, VisjectSurface surface)
            {
                for (int i = 0; i < surface.Nodes.Count; i++)
                {
                    if (surface.Nodes[i] is IParametersDependantNode node)
                    {
                        return (Guid)surface.Nodes[i].Values[0] == param.ID && surface.Nodes[i].GetBoxes().Any(b => b.Connections.Count > 0);
                    }
                }

                return false;
            }

            /// <inheritdoc />
            public override void OnLoaded(SurfaceNodeActions action)
            {
                base.OnLoaded(action);

                if (Surface != null)
                {
                    UpdateCombo();
                    UpdateLayout();
                }
            }

            /// <inheritdoc />
            public override void OnSurfaceLoaded(SurfaceNodeActions action)
            {

Review comment (refactor):
Simplify this code into `return (Guid)Values[0] == param.ID;`

Code after:
            public void OnParamRenamed(SurfaceParameter param)
            {
                UpdateCombo();
                UpdateTitle();
            }

            /// <inheritdoc />
            public void OnParamEdited(SurfaceParameter param)
            {
                UpdateLayout();
            }

            /// <inheritdoc />
            public void OnParamDeleted(SurfaceParameter param)
            {
                // Deselect if that parameter is selected
                if ((Guid)Values[0] == param.ID)
                    _combobox.SelectedIndex = -1;

                UpdateCombo();
            }

            /// <inheritdoc />
            public bool IsParamreferenced(SurfaceParameter param)
            {
                return (Guid)Values[0] == param.ID;
            }

            /// <inheritdoc />
            public override void OnLoaded(SurfaceNodeActions action)
            {
                base.OnLoaded(action);

                if (Surface != null)
                {
                    UpdateCombo();
                    UpdateLayout();
                }
            }

            /// <inheritdoc />
            public override void OnSurfaceLoaded(SurfaceNodeActions action)
            {
                base.OnSurfaceLoaded(action);

                UpdateTitle();
            }

            /// <inheritdoc />
            public override void OnValuesChanged()
            {