Example #1
0
        public static bool IsReadonlyProperty(this BasePropertyDeclarationSyntax property)
        {
            if (property == null)
            {
                return(false);
            }

            return(property.GetAccessor() != null &&
                   property.GetAccessor().Body == null &&
                   property.SetAccessor() == null);
        }