GlueViewOfficialPlugins.Scripting.ScriptParsingPlugin.GetMethodLines C# (CSharp) Method

GetMethodLines() private method

private GetMethodLines ( IElement element, EventResponseSave ers, string projectDirectory ) : string[]
element IElement
ers FlatRedBall.Glue.Events.EventResponseSave
projectDirectory string
return string[]
        private string[] GetMethodLines(IElement element, EventResponseSave ers, string projectDirectory)
        {
            string[] toReturn = null;
            lock (mCachedMethodLines)
            {
                if (!mCachedMethodLines.ContainsKey(ers.EventName))
                {
                    ParsedMethod parsedMethod =
                        ers.GetParsedMethodFromAssociatedFile(element, projectDirectory);
                    string[] lines = parsedMethod.MethodContents.Split(separators, StringSplitOptions.RemoveEmptyEntries);

                    mCachedMethodLines.Add(ers.EventName, lines);
                }

                toReturn = mCachedMethodLines[ers.EventName];
            }
            return toReturn;
        }