public void PrimaryTextChanged(int processImmediately) { string primaryText = _source.GetPrimaryText(); var sb = new NHamlParser(primaryText); sb.Parse(); var result = sb.codeMapper.output; var mappings = sb.codeMapper.mappings; var paints = sb.codeMapper.paintings; int cMappings = mappings.Length; if (cMappings == 0) mappings = new _SOURCEMAPPING[1]; int cPaints = paints.Length; if (cPaints == 0) paints = new _SOURCEPAINTING[1]; foreach (var events in _events.Values) { events.OnGenerated( primaryText, result, cMappings, ref mappings[0], cPaints, ref paints[0]); } }
public void PrimaryTextChanged(int processImmediately) { string primaryText = _source.GetPrimaryText(); var sb = new NHamlParser(primaryText); sb.Parse(); var result = sb.codeMapper.output; var mappings = sb.codeMapper.mappings; var paints = sb.codeMapper.paintings; int cMappings = mappings.Length; if (cMappings == 0) { mappings = new _SOURCEMAPPING[1]; } int cPaints = paints.Length; if (cPaints == 0) { paints = new _SOURCEPAINTING[1]; } // Simple debug /*using (var tw = new StreamWriter(@"e:\output.txt")) * { * tw.Write(result); * }*/ foreach (var events in _events.Values) { events.OnGenerated( primaryText, result, cMappings, ref mappings[0], cPaints, ref paints[0]); } }