public MemberGenerationContext( [NotNull] ITypeDeclaration typeDeclaration, [CanBeNull] IModifiersList modifiersList, [CanBeNull] ITypeUsage expectedReturnTypeUsage, [NotNull] TextLookupRanges memberReplaceRanges) { TypeDeclaration = typeDeclaration; PsiModule = typeDeclaration.GetPsiModule(); ModifiersList = modifiersList; MemberReplaceRanges = memberReplaceRanges; ExpectedAccessRights = ModifiersUtil.GetAccessRightsModifiers(modifiersList); if (expectedReturnTypeUsage != null) { ExpectedReturnType = CSharpTypeFactory.CreateType(expectedReturnTypeUsage); } }