public string ClassDeclaration(Type interfaceType)
        {
            var interfaceName = interfaceType.CreateCsName(interfaceType.Namespace);

            var(basename, genericInfo) = interfaceName.ExtractImplementationNameParts("<");
            var constraints = MemberMetadata.GetGenericParameterConstraints(interfaceType.GetGenericArguments(), interfaceType.Namespace);

            return($"Stub{basename}{genericInfo} : {interfaceName}{constraints}");
        }
        public string ClassDeclaration(Type type)
        {
            var    typeName = type.CreateCsName(type.Namespace);
            string basename;

            (basename, genericInfo) = typeName.ExtractImplementationNameParts("<");
            constraints             = MemberMetadata.GetGenericParameterConstraints(type.GetGenericArguments(), type.Namespace);

            intermediateWriter.Write($"public class IntermediateStub{basename}_DoNotUse{genericInfo} : {typeName}{constraints}");
            Debug.Assert(intermediateClassScope == null);
            intermediateClassScope = intermediateWriter.Scope;
            stubTypeName           = $"Stub{basename}{genericInfo}";

            return($"{stubTypeName} : IntermediateStub{basename}_DoNotUse{genericInfo}{constraints}");
        }