“It would be ungenerous to affect not to know that your self-denial is to be referred to your consideration for her father"
Chapter 10, A Tale of Two Cities.
Just translate parts of the sentence to simpler words, or more-obvious words, or in some cases place-holders, as follows.
This gives “It would be mean to pretend that your X is [not] because of your regard for Y”. Roughly paraphrased, it says “I know you did X because of Y”.
Edit: I accidentally left out a not. I show it in brackets to indicate that it is moved to a later position in the simplified sentence.