public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            bool rc = base.Write(writer);

            writer.SetBoolean(ID_HideInput, HiddenCodeInput);

            if (HiddenCodeInput)
            {
                writer.SetString(ID_CodeInput, Code);
            }

            writer.SetBoolean(ID_HideOutput, HiddenOutOutput);


            //update if possible and save editor location
            {
                Form editor;
                if (Attributes.TryGetEditor(out editor))
                {
                    DefaultEditorLocation = editor.Location;
                    DefaultEditorSize     = editor.Visible ? editor.Size : editor.RestoreBounds.Size;
                }
            }
            if (DefaultEditorLocation != null)
            {
                writer.SetDrawingPoint(ID_EditorLocation, DefaultEditorLocation.Value);
                writer.SetDrawingSize(ID_EditorSize, DefaultEditorSize);
            }

            return(rc);
        }