public static string GetSharedCodeFullFileName(this EventResponseSave instance) { var container = instance.GetContainer(); if (container != null) { return(FileManager.GetDirectory(ProjectManager.GlueProjectFileName) + EventResponseSave.GetEventFileNameForElement(instance.GetContainer())); } else { return(null); } }
public static string GetEventContents(this EventResponseSave instance) { IElement element = instance.GetContainer(); string textToAssign = null; if (FacadeContainer.Self.GlueState.CurrentEventResponseSave != null) { if (!string.IsNullOrEmpty(instance.Contents)) { textToAssign = instance.Contents; } else { // Is there a non-Generated.Event.cs file? string fileToLookFor = FileManager.RelativeDirectory + EventResponseSave.GetEventFileNameForElement(element); if (File.Exists(fileToLookFor)) { ParsedMethod parsedMethod = instance.GetParsedMethodFromAssociatedFile(); if (parsedMethod != null) { textToAssign = parsedMethod.MethodContents; } } } } else { textToAssign = null; } return(textToAssign); }
public static string EventResponseSaveToString(this EventResponseSave eventResponseSave) { return(eventResponseSave.EventName + "(Event Response in " + eventResponseSave.GetContainer() + ")"); }