/// <summary> /// Process for specified event. /// </summary> /// <param name="evt">Configured event.</param> /// <returns>Result of handling.</returns> public override bool process(ISolutionEvent evt) { IModeOperation operation = (IModeOperation)evt.Mode; if (operation.Command == null || operation.Command.Length < 1) { return(true); } DTEOperation dteo = new DTEOperation(cmd.Env, cmd.EventType); if (!evt.SupportMSBuild && !evt.SupportSBEScripts) { dteo.exec(operation.Command, operation.AbortOnFirstError); return(true); } // need evaluation for data ECommand[] parsed = new ECommand[operation.Command.Length]; for (int i = 0; i < operation.Command.Length; ++i) { parsed[i].name = parse(evt, operation.Command[i].name); parsed[i].args = parse(evt, operation.Command[i].args); } dteo.exec(parsed, operation.AbortOnFirstError); return(true); }
public void dtePreparedTest3() { DTEOperation target = new DTEOperation((IEnvironment)null, SolutionEventType.General); string line = "Debug StartWithoutDebugging"; DTEOperation.DTEPrepared actual = target.parse(line); }
public DTECheckFrm(IEnvironment env) { _dteo = new DTEOperation(env, vsCE.Events.SolutionEventType.General); InitializeComponent(); Icon = Resource.Package_32; }
/// <summary> /// Process for specified event. /// </summary> /// <param name="evt">Configured event.</param> /// <returns>Result of handling.</returns> public override bool process(ISolutionEvent evt) { IModeOperation operation = (IModeOperation)evt.Mode; if(operation.Command == null || operation.Command.Length < 1) { return true; } DTEOperation dteo = new DTEOperation(cmd.Env, cmd.EventType); if(!evt.SupportMSBuild && !evt.SupportSBEScripts) { dteo.exec(operation.Command, operation.AbortOnFirstError); return true; } // need evaluation for data ECommand[] parsed = new ECommand[operation.Command.Length]; for(int i = 0; i < operation.Command.Length; ++i) { parsed[i].name = parse(evt, operation.Command[i].name); parsed[i].args = parse(evt, operation.Command[i].args); } dteo.exec(parsed, operation.AbortOnFirstError); return true; }
public void dtePreparedTest2() { DTEOperation target = new DTEOperation((IEnvironment)null, SolutionEventType.General); string line = "Debug.StartWithoutDebugging"; DTEOperation.DTEPrepared actual = target.parse(line); Assert.AreEqual("Debug.StartWithoutDebugging", actual.name); Assert.AreEqual("", actual.args); }
public void dtePreparedTest() { DTEOperation target = new DTEOperation((IEnvironment)null, SolutionEventType.General); string line = "File.OpenProject(\"c:\\path\\app.sln\")"; DTEOperation.DTEPrepared actual = target.parse(line); Assert.AreEqual("File.OpenProject", actual.name); Assert.AreEqual("\"c:\\path\\app.sln\"", actual.args); }
/// <param name="env">Used environment</param> public DTEComponent(IEnvironment env) : base(env) { dteo = new DTEOperation(env, Events.SolutionEventType.General); attachCommandEvents(); }
public void dtePreparedTest5() { DTEOperation target = new DTEOperation((IEnvironment)null, SolutionEventType.General); string line = " OpenProject(arg) "; DTEOperation.DTEPrepared actual = target.parse(line); Assert.AreEqual("OpenProject", actual.name); Assert.AreEqual("arg", actual.args); }