Skip to content

Instantly share code, notes, and snippets.

@dijeferson
Last active November 23, 2015 21:05
Show Gist options
  • Save dijeferson/c4030357c46c818f6389 to your computer and use it in GitHub Desktop.
Save dijeferson/c4030357c46c818f6389 to your computer and use it in GitHub Desktop.
The purpose of this script is to create the c# interface of public classes automatically, based on it's public methods and properties.
# Author Jeferson Santos
# jefersonsantos.com
# @dijeferson
# Imports
import re
# Methods
def isPublicClass(content):
pattern = r'(public class\s)(\w+)'
#pattern = re.compile(pattern)
for line in content:
m = re.match(pattern, line)
if m:
return TRUE
else:
return FALSE
def getFileAsArrayOfString(path):
lines = tuple(open(path, 'r'))
return lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment