Example #1
0
        public void AddPropMemberWrapper
        (
            string fullMemberName,
            string propName,
            INamedTypeSymbol propType,
            Accessibility accessibility       = Accessibility.Public,
            string addBeforeSetter            = null,
            string addAfterSetter             = null,
            Accessibility setterAccessibility = Accessibility.NotApplicable
        )
        {
            AddPropOpening(propName, propType, accessibility);

            AddPropGetter(fullMemberName, propType, Accessibility.NotApplicable);

            setterAccessibility = setterAccessibility.GetPropPartAccessibility(accessibility);

            AddPropSetter
            (
                fullMemberName,
                propType,
                setterAccessibility,
                addBeforeSetter,
                addAfterSetter
            );

            Pop();
        }
Example #2
0
        public void AddAutoProp
        (
            string propName,
            INamedTypeSymbol propType,
            Accessibility propAccessibility   = Accessibility.Public,
            Accessibility getterAccessibility = Accessibility.NotApplicable,
            Accessibility setterAccessibility = Accessibility.NotApplicable,
            bool shouldOverride = false
        )
        {
            getterAccessibility = getterAccessibility.GetPropPartAccessibility(propAccessibility);

            AddPropOpening(propName, propType, propAccessibility, shouldOverride);

            AddAutoGetter(getterAccessibility);

            setterAccessibility = setterAccessibility.GetPropPartAccessibility(propAccessibility);

            AddAutoSetter(setterAccessibility);

            Pop();
        }