public override void ErrorPause(string errBuf, p4dn.Error err) { if (DeferedException != null) return; // don't know how this would be called. AFIK, the only way to get here is to fill out a form // incorrectly, and other code should deal with that. DeferedException = new P4API.Exceptions.ErrorPauseCalled(); }
//public override void Diff(System.IO.FileInfo f1, System.IO.FileInfo f2, int doPage, string diffFlags, p4dn.Error err) //{ // if (DeferedException != null) return; // try // { // _callback.Diff(f1, f2, diffFlags); // } // catch (Exception e) // { // DeferedException = e; // } //} public override void Edit(System.IO.FileInfo f1, p4dn.Error err) { // don't give the consumer any more messages if we're in an error state if (DeferedException != null) return; // this only happens when the user is fetching a form w/o using FetchForm method. DeferedException = new P4API.Exceptions.FormCommandException(); }
public override void InputData(ref string buff, p4dn.Error err) { System.Text.StringBuilder sb = new StringBuilder(); if (DeferedException == null) { try { _callback.InputData(sb); } catch (Exception e) { DeferedException = e; } } buff = sb.ToString(); }
public override void HandleError(p4dn.Error err) { if (DeferedException != null) return; try { _callback.OutputMessage(new P4Message(err)); } catch(Exception e) { DeferedException = e; } }
public override p4dn.P4MergeStatus Resolve(p4dn.P4MergeData mergeData) { if (DeferedException != null) return p4dn.P4MergeStatus.CMS_QUIT; try { using (MergeData merger = new MergeData(mergeData)) { MergeAction action = _callback.ResolveFile(merger); switch (action) { case MergeAction.Quit: return p4dn.P4MergeStatus.CMS_QUIT; case MergeAction.Skip: return p4dn.P4MergeStatus.CMS_SKIP; case MergeAction.AcceptEdit: return p4dn.P4MergeStatus.CMS_EDIT; case MergeAction.AcceptMerged: return p4dn.P4MergeStatus.CMS_MERGED; case MergeAction.AcceptTheirs: return p4dn.P4MergeStatus.CMS_THEIRS; case MergeAction.AcceptYours: return p4dn.P4MergeStatus.CMS_YOURS; } } } catch (Exception e) { DeferedException = e; } return p4dn.P4MergeStatus.CMS_QUIT; }
public override void Prompt(string msg, ref string rsp, bool noEcho, p4dn.Error err) { if (DeferedException != null) return; try { _callback.Prompt(msg, ref rsp); } catch (Exception e) { DeferedException = e; } }