private static IConstructorDeclaration CreateDeserializationConstructor(
            IClassLikeDeclaration classLikeDeclaration,
            CSharpElementFactory elementFactory)
        {
            var result = elementFactory.CreateConstructorDeclaration();

            result.SetAccessRights(classLikeDeclaration is IClassDeclaration ? AccessRights.PROTECTED : AccessRights.PRIVATE);

            var infoParameterDeclaration    = AddInfoParameter(result, classLikeDeclaration);
            var contextParameterDeclaration = AddContextParameter(result, classLikeDeclaration);

            if (HasBaseClassWithDeserializationConstructor(classLikeDeclaration))
            {
                var initializer = CreateBaseConstructorInitializer(elementFactory, infoParameterDeclaration, contextParameterDeclaration);
                result.SetInitializer(initializer);
            }

            return(result);
        }