/// <summary>Constructs and Attaches a new StatusPair from the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult AttachStatus(ERRCODE errCode, String errText) { StatusList.Add(new StatusPair() { ErrCode = errCode, ErrText = errText }); return(this); }
/// <summary> /// Throw a Contradiction. /// </summary> /// <param name="obj"></param> static public void Throw(ERRCODE err, object obj) { switch (err) { case ERRCODE.DIRECT: // Direct Contradiction // e.g. Apple is red VS Apple is blue //---------------------------------------- Concept[] pairs = obj as Concept[]; if ((object)pairs != null) { // TODO } //---------------------------------------- break; case ERRCODE.INHERITANCE: // Inheritance Contradiction // e.g. Foo is an apple VS Foo is blue //---------------------------------------- pairs = obj as Concept[]; if ((object)pairs != null) { // TODO } //---------------------------------------- break; case ERRCODE.RULE: // Rule Contradiction // e.g. VERB+NOUN=VP , VERB+NOUN=NOUN //---------------------------------------- //---------------------------------------- break; default: break; } }
/// <summary>Sets the first CAACK to CAACK.RejectedInvalidState. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetRejectedInvalidState(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.RejectedInvalidState); AttachStatus(errCode, errText); return(this); }
/// <summary>Sets the first CAACK to CAACK.InvalidDataOrArgument. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetInvalidDataOrArgument(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.InvalidDataOrArgument); AttachStatus(errCode, errText); return(this); }
/// <summary>Sets the first CAACK to CAACK.CannotPerformNow. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetCannotPerformNow(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.CannotPerformNow); AttachStatus(errCode, errText); return(this); }
/// <summary>Sets the first CAACK to CAACK.InvalidCommand. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetCommandInvalid(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.InvalidCommand); AttachStatus(errCode, errText); return(this); }
/// <summary>Sets the first CAACK to CAACK.CommandPerformedWithErrors. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetCommandFailed(ERRCODE errCode, String errText) { SetCommandFailed(); AttachStatus(errCode, errText); return(this); }
/// <summary>Sets the first CAACK to CAACK.RejectedInvalidState. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetRejectedInvalidState(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.RejectedInvalidState); AttachStatus(errCode, errText); return this; }
/// <summary>Sets the first CAACK to CAACK.InvalidDataOrArgument. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetInvalidDataOrArgument(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.InvalidDataOrArgument); AttachStatus(errCode, errText); return this; }
/// <summary>Sets the first CAACK to CAACK.InvalidCommand. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetCommandInvalid(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.InvalidCommand); AttachStatus(errCode, errText); return this; }
/// <summary>Sets the first CAACK to CAACK.CommandPerformedWithErrors. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetCommandFailed(ERRCODE errCode, String errText) { SetCommandFailed(); AttachStatus(errCode, errText); return this; }
/// <summary>Sets the first CAACK to CAACK.CannotPerformNow. Attaches a StatusPair with the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult SetCannotPerformNow(ERRCODE errCode, String errText) { SetFirstCAACK(CAACK.CannotPerformNow); AttachStatus(errCode, errText); return this; }
/// <summary>Constructs and Attaches a new StatusPair from the given errCode and errText. Supports call chaining.</summary> public CarrierActionResult AttachStatus(ERRCODE errCode, String errText) { StatusList.Add(new StatusPair() { ErrCode = errCode, ErrText = errText }); return this; }