GetGetMethod() public static method

public static GetGetMethod ( IPropertyReference value ) : IMethodDeclaration
value IPropertyReference
return IMethodDeclaration
Beispiel #1
0
        public static MethodVisibility GetVisibility(IPropertyReference value)
        {
            IMethodDeclaration getMethod = Helper.GetGetMethod(value);
            IMethodDeclaration setMethod = Helper.GetSetMethod(value);

            MethodVisibility visibility = MethodVisibility.Public;

            if ((setMethod != null) && (getMethod != null))
            {
                if (getMethod.Visibility == setMethod.Visibility)
                {
                    visibility = getMethod.Visibility;
                }
            }
            else if (setMethod != null)
            {
                visibility = setMethod.Visibility;
            }
            else if (getMethod != null)
            {
                visibility = getMethod.Visibility;
            }

            return(visibility);
        }
Beispiel #2
0
        public static bool IsStatic(IPropertyReference value)
        {
            IMethodDeclaration setMethod = Helper.GetSetMethod(value);
            IMethodDeclaration getMethod = Helper.GetGetMethod(value);
            bool isStatic = false;

            isStatic |= ((setMethod != null) && (setMethod.Static));
            isStatic |= ((getMethod != null) && (getMethod.Static));
            return(isStatic);
        }