pManager.AddSurfaceParameter in vs failed in Rhino8?

All plugin(Visualstudio) that input is surface ;(pManager.AddSurfaceParameter )in vs failed in Rhino8? And we must change it to brep input then make Surfase!!

Brep brep=null;
DA.getdata(0,ref brep)
var surfase =brep.faces[0].duplicate Surface();
............

But in Rhino7 not problem
Is there bug ? Or features?
And must we in our plugins chang all surface input parameters To Brep ?to able work in Rhino8?
@DavidRutten
@dale
@mahdiyar

There should not be a breaking change in the SDK between Rhino 7 and Rhino 8.

Note that in Grasshopper, “surfaces” are not the same as what Rhino calls “surfaces”. Surfaces in Grasshopper can be trimmed, and are therefore stored as single face Rhino.Geometry.Brep instead of Rhino.Geometry.Surface. But this has always been true.

hi @DavidRutten
why ?in this simple example this get this error?:!
c#

    protected override void RegisterInputParams(GH_InputParamManager pManager)
    {
        pManager.AddSurfaceParameter("Surface", "Surface", "srf", GH_ParamAccess.item);

    }

    protected override void RegisterOutputParams(GH_OutputParamManager pManager)
    {
        pManager.AddSurfaceParameter("surfaceOut", "surfacesOut", "srf", GH_ParamAccess.item);
    }

    protected override void SolveInstance(IGH_DataAccess DA)
    {
        Surface srf = null;
               DA.GetData(0, ref srf);
        DA.SetData(0, srf);


    }


And when changing (Surface) to gh_Surface(surface) error is fixed:

 DA.SetData(0, new GH_Surface(srf));

Because the Surface parameter does not contain Rhino.Geometry.Surface, it contains GH_Surface values. GH_Surface is based on breps, not on Rhino surfaces, with the limitation that those breps contain only a single face. This is the only way that “surfaces” in Grasshopper can support trims.