Esempio n. 1
0
 public void Write(RespType type)
 {
     if (_currentSpan.IsEmpty)
     {
         Flush();
     }
     _currentSpan[0] = (byte)type;
     Commit(1);
 }
Esempio n. 2
0
 public static object RespObj(RespType type,
                              string msg,
                              string[] replyTitles = null,
                              (string Title, string Subtitle, string PostBack, string CardImg, string BtnText)[] cards = null,
Esempio n. 3
0
 internal static void RespTypeNotImplemented(RespType type, [CallerMemberName] string?caller = null)
 => throw new NotImplementedException($"RESP type not implemented by '{caller}': {type}");
Esempio n. 4
0
 public void SimpleExamples(string payload, RespType expectedType, string expectedText)
 => Verify(payload, RespValue.Create(expectedType, expectedText), null);
Esempio n. 5
0
 /// <summary>
 /// Construtor passando o tipo de funcao e o tipo de solucao
 /// </summary>
 public ObjectiveFunction(FuncType Type, RespType solution)
 {
     Z        = new List <Tuple <string, double> >( );
     Solution = solution;
 }
Esempio n. 6
0
 /// <summary>
 /// Construtor passando o tipo de funcao
 /// </summary>
 public ObjectiveFunction(FuncType funcType)
 {
     Z        = new List <Tuple <string, double> >( );
     Type     = funcType;
     Solution = RespType.NotASolution;
 }
Esempio n. 7
0
 private byte[] FormatMessage(RespType type, string message)
 {
     return _encoder.GetBytes(string.Format("{0}{1}{2}", (int) type, BEL, message));
 }