コード例 #1
0
        public void HandleInbound(Inbound inbound)
        {
            try
            {
                LoggerManager.GetLogger().Trace("Handling new inbound: \"{0}\"", inbound.Text);

                MessageParser parser = new MessageParser(inbound.Text);
                LoggerManager.GetLogger().Trace("Inbound message parsed. Detected operation: {0}", parser.Operation.GetType().Name);
                ExecuteOperation(inbound.From, parser.Operation, parser.CleanMessage);
            }
            catch (Exception ex)
            {
                LoggerManager.GetLogger().ErrorException("Error occured handling inbound message!", ex);

                try
                {
                    using (RemoteManager mgr = new RemoteManager(inbound.From))
                    {
                        mgr.SendSms(String.Format("Fehler beim Bearbeiten des SMS: {0}\r\n{1}", ex.Message, Constants.HelpMsg));
                    }
                }
                catch (Exception ex2)
                {
                    LoggerManager.GetLogger().ErrorException("Error while notifying user about failure.", ex2);
                }
            }
        }
コード例 #2
0
        public void CompleteRead(Ring ring, int result)
        {
            RemoveFlag(ConnectionState.Reading);
            if (result <= 0)
            {
                if (!HandleCompleteReadError(ring, result))
                {
                    DisposeReadHandles();
                }

                return;
            }

            DisposeReadHandles();

            int  advanced  = _state;
            uint toAdvance = (uint)(result - advanced);

            if (toAdvance > MaxBufferSize)
            {
                ThrowHelper.ThrowNewInvalidOperationException();
            }

            Inbound.Advance((int)toAdvance);
            _state = result; // Store result as State to determine memory requirements for next read
            FlushRead(ring);
        }
コード例 #3
0
 public void QueueEvent(Inbound action, params object[] m)
 {
     lock ( m_queueLock )
     {
         m_queuedEvents.Add(action);
         m_queuedParams.Add(m);
     }
 }
コード例 #4
0
    static void Main(string[] args)
    {
        ReportDirections reportDirections = new ReportDirections();

        reportDirections.selected = "inbound";
        Times Times = new Times();

        Times.dateRange = "Last5Minutes";
        Filters Filters = new Filters();

        Filters.sdfDips_0 = "in_AC10033A_AC10033A-410";
        DataGranularity DataGranularity = new DataGranularity();

        DataGranularity.selected = "auto";
        ReportDetails ReportDetails = new ReportDetails();

        ReportDetails.reportTypeLang   = "conversations";
        ReportDetails.reportDirections = reportDirections;
        ReportDetails.times            = Times;
        ReportDetails.filters          = Filters;
        ReportDetails.dataGranularity  = DataGranularity;
        //
        QueryLimit QueryLimit = new QueryLimit();

        QueryLimit.offset       = 0;
        QueryLimit.max_num_rows = 1;
        QueryLimit2 QueryLimit2 = new QueryLimit2();

        QueryLimit2.offset       = 0;
        QueryLimit2.max_num_rows = 1;
        Table Table = new Table();

        Table.query_limit = QueryLimit;
        Table2 Table2 = new Table2();

        Table2.query_limit = QueryLimit2;
        Inbound Inbound = new Inbound();

        Inbound.table = Table;
        Outbound Outbound = new Outbound();

        Outbound.table = Table2;
        DataINeed DataINeed = new DataINeed();

        DataINeed.inbound  = Inbound;
        DataINeed.outbound = Outbound;
        WebClient _webClient = new WebClient();

        _webClient.Headers.Add("Content-Type", "application/json");
        string data_requested = HttpUtility.UrlEncode(JsonConvert.SerializeObject(DataINeed));
        string rpt_json       = HttpUtility.UrlEncode(JsonConvert.SerializeObject(ReportDetails));
        string data           = "action=get&rm=report_api&data_requested=" + data_requested + "&rpt_json=" + rpt_json;

        string address      = "http://gh-scr-d01.diti.lr.net/fcgi/scrut_fcgi.fcgi";
        var    responseText = Encoding.Default.GetString(_webClient.UploadData(address, "POST", Encoding.Default.GetBytes(data)));

        Console.WriteLine(responseText);
    }
コード例 #5
0
        public void Given_QtyIs26_And_MaxQtyIs50_When_InboundIs30_Then_ThrowOverQtyLimitationException()
        {
            var param      = this.GetParameters(maxQty: 50);
            var createdCmd = new CreateInventory(param.id, 26, param.item, new[] { param.constraint });
            var inboundCmd = new Inbound(30);
            var actual     = Inventory.Create(createdCmd);

            Action action = () => actual.Inbound(inboundCmd);

            action.Should().Throw <OverQtyLimitationException>();
        }
コード例 #6
0
        public void When_InboundIsNegativeDigital_Then_ThrowAmountIncorrectException()
        {
            var param      = this.GetParameters();
            var createdCmd = new CreateInventory(param.id, 0, param.item, new[] { param.constraint });
            var inboundCmd = new Inbound(-3);

            var actual = Inventory.Create(createdCmd);

            Action action = () => actual.Inbound(inboundCmd);

            action.Should().Throw <AmountIncorrectException>();
        }
コード例 #7
0
        private AsyncOperationResult FlushAsync()
        {
            var awaiter = Inbound.FlushAsync().GetAwaiter();

            _flushResultAwaiter = awaiter;
            if (awaiter.IsCompleted)
            {
                return(HandleFlushedToApp(true));
            }

            awaiter.UnsafeOnCompleted(_onOnFlushedToApp);
            return(default);
コード例 #8
0
        public void Add()
        {
            var dialog = new NewRewriteRuleDialog(Inbound.Module);

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            if (dialog.SelectedIndex == 0)
            {
                var service = (INavigationService)GetService(typeof(INavigationService));
                service.Navigate(null, null, typeof(InboundRulePage), new Tuple <InboundFeature, InboundRule>(Inbound, null));
                Inbound.Refresh();
            }
            else if (dialog.SelectedIndex == 1)
            {
                var rule = new NewRuleWithRewriteMapsDialog(Inbound.Module, Inbound);
                if (rule.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
            }
            else if (dialog.SelectedIndex == 2)
            {
                var rule = new NewRuleBlockingDialog(Inbound.Module, Inbound);
                if (rule.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
            }
            else if (dialog.SelectedIndex == 4)
            {
                var service = (INavigationService)GetService(typeof(INavigationService));
                service.Navigate(null, null, typeof(OutboundRulePage), new Tuple <OutboundFeature, OutboundRule>(Outbound, null));
                Outbound.Refresh();
            }
            else if (dialog.SelectedIndex == 5)
            {
                var service = (IManagementUIService)GetService(typeof(IManagementUIService));
                if (
                    service.ShowMessage("Search engines treat Web sites that can be accessed by more than one URL, each differing only in letter casing, as if they are two different sites. This results in a reduced ranking for the Web site. Use this rule template to create a redirect rule that will enforce the use of lowercase letters in the URL." + Environment.NewLine + Environment.NewLine + "Do you want to create a rule?", "Add a rule that will enforce lowercase URLs",
                                        MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) !=
                    DialogResult.Yes)
                {
                    return;
                }

                Inbound.Add();
            }
        }
コード例 #9
0
        public void Inbound(Inbound cmd)
        {
            if (new AmountSpec(cmd.Amount).IsSatisfy() == false)
            {
                throw new AmountIncorrectException();
            }
            if (new InboundSpec(this, cmd.Amount).IsSatisfy() == false)
            {
                throw new OverQtyLimitationException(cmd.Amount);
            }

            this.Qty += cmd.Amount;
            this.ApplyEvent(new Inbounded(this.Id, cmd.Amount, this.Qty));
        }
コード例 #10
0
        public void Given_QtyIs0_When_InboundIs50_Then_QtyIs50()
        {
            var param      = this.GetParameters(maxQty: 50);
            var expectQty  = 50;
            var createdCmd = new CreateInventory(param.id, 0, param.item, new[] { param.constraint });
            var inboundCmd = new Inbound(50);

            var actual = Inventory.Create(createdCmd);

            actual.Inbound(inboundCmd);
            var evt = (Inbounded)actual.DomainEvents.Last();

            actual.Qty.Should().Be(expectQty);
            evt.Amount.Should().Be(50);
            evt.Qty.Should().Be(50);
        }
コード例 #11
0
    private void MoveQueuedEventsToExecuting()
    {
        lock ( m_queueLock )
        {
            while (m_queuedEvents.Count > 0)
            {
                Inbound  e = m_queuedEvents[0];
                object[] p = m_queuedParams[0];

                m_executingEvents.Add(e);
                m_executingParams.Add(p);

                m_queuedEvents.RemoveAt(0);
                m_queuedParams.RemoveAt(0);
            }
        }
    }
コード例 #12
0
ファイル: Caller.cs プロジェクト: Mattteo1220/IVRService
 public Caller CallHandler(Inbound inboundCaller)
 {
     Ani                = inboundCaller.Ani;
     Dnis               = dnis;
     Language           = dtmf == 8 ? "Spanish" : "English";
     Environment        = environment;
     LeasingCompany     = CallBaseHelper.LLCType[dnis];
     OriginalDepartment = CallBaseHelper.Department[dnis];
     FinalDepartment    = OriginalDepartment;
     MasterId           = MasterId;
     AuthToken          = Authenticate();
     if (!string.IsNullOrEmpty(AuthToken))
     {
         Consumer = new Consumer().DetermineConsumer(this);
     }
     HoursOfOperation = (int)FinalDepartment; //Hours of operation
     return(this);
 }
コード例 #13
0
ファイル: Network.cs プロジェクト: kekekeks/libvirt-bindings
        public string To_XML()
        {
            if (Inbound == null && Outbound == null)
            {
                return("");
            }
            var ret = "<bandwidth>";

            if (Inbound != null)
            {
                ret += "<inbound " + Inbound.To_XML();
            }
            if (Outbound != null)
            {
                ret += "<outbound " + Outbound.To_XML();
            }
            ret += "</bandwidth>";
            return(ret);
        }
コード例 #14
0
        public IActionResult Post([FromBody] Inbound value)
        {
            var result = new Outbound
            {
                AceId          = DateTime.Now.Ticks,
                LiveScoreLogId = DateTime.UtcNow.Ticks,
                PdScore        = _random.NextDouble(),
                LoanAmount     = _random.Next(10000, 100000) / 100.0m,
            };

            if (result.PdScore > 0.5)
            {
                for (int i = 0; i < _random.Next(1, 4); i++)
                {
                    result.AdverseActionReasons[$"Reason {i}"] = $"Adding {Guid.NewGuid()} as a reason at {DateTime.UtcNow}";
                }
            }
            return(Ok(result));
        }
コード例 #15
0
        void Run()
        {
            connection.mainThread = Thread.CurrentThread;

            while (true)
            {
                Message msg = ReadMessage();
                //if (connection.pendingCalls.ContainsKey (msg.Header.Serial))
                if (msg.Header.MessageType == MessageType.MethodReturn || msg.Header.MessageType == MessageType.Error)
                {
                    connection.HandleMessage(msg);
                }
                else
                {
                    Inbound.Enqueue(msg);
                    FireWakeUp();
                }
            }
        }
コード例 #16
0
ファイル: SmbCommModule.cs プロジェクト: tooBugs/SharpC2
    private void ReadCallback(IAsyncResult ar)
    {
        var state = ar.AsyncState as CommStateObject;
        var pipe  = state.Worker as NamedPipeServerStream;

        var bytesRead = 0;

        try
        {
            bytesRead = pipe.EndRead(ar);
        }
        catch { }

        if (bytesRead > 0)
        {
            var data = DataJuggle(bytesRead, pipe, state);

            if (Crypto.VerifyHMAC(data))
            {
                var inbound = Crypto.Decrypt <AgentMessage>(data);

                if (inbound != null)
                {
                    Inbound.Enqueue(inbound);
                }
            }
        }

        var outbound = new AgentMessage {
            Metadata = Metadata
        };

        if (Outbound.Count > 0)
        {
            outbound = Outbound.Dequeue();
        }

        var dataToSend = Crypto.Encrypt(outbound);

        pipe.BeginWrite(dataToSend, 0, dataToSend.Length, new AsyncCallback(WriteCallback), pipe);
    }
コード例 #17
0
        private void MessageHandler(Byte[] body, MessageProperties mp, MessageReceivedInfo mi)
        {
            using (var exdb = new exDb(dbConnStr)) {
                exdb.Log = dbLog;

                new LogRecord()
                {
                    Source  = this._Name,
                    HostId  = this.HostId,
                    QueueId = this.QueueId,
                    Message = String.Format("Принято сообщение {0} байт", body.Length),
                    Details = this.QueueFullName
                }
                .TryWrite(exdb);

                var msg = Queue.Base64Data ? Convert.ToBase64String(body)
                                        : this.Encoding.GetString(body);

                var record = new Inbound()
                {
                    QueueId      = this.QueueId,
                    DateReceived = DateTime.Now,
                    Message      = msg
                };
                exdb.Inbound.InsertOnSubmit(record);
                // Rethrow = true. Если не удалось записать сообщение в БД, таск должен упасть, чтобы EasyNetQ не отправил Ack раббиту
                exdb.TrySubmitChanges(true);

                new LogRecord()
                {
                    Source     = this._Name,
                    HostId     = this.HostId,
                    QueueId    = this.QueueId,
                    Inbound_Id = record.Message_Id,
                    Message    = String.Format("Записали {0}сообщение в БД", Queue.Base64Data ? "base64 " : ""),
                    Details    = String.Format("{0} символов", msg.Length)
                }
                .TryWrite(exdb);
            }
        }
コード例 #18
0
    private void Update()
    {
        MoveQueuedEventsToExecuting();

        while (m_executingEvents.Count > 0)
        {
            Inbound  action = m_executingEvents[0];
            object[] p      = m_executingParams[0];

            m_executingEvents.RemoveAt(0);
            m_executingParams.RemoveAt(0);

            if (instructionParams.ContainsKey(action))
            {
                instructionParams[action].Invoke(p);
            }
            else
            {
                Debug.LogError(string.Format("No instruction for {0}.", action));
            }
        }
    }
コード例 #19
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (HasInbound)
            {
                hash ^= Inbound.GetHashCode();
            }
            if (HasOutbound)
            {
                hash ^= Outbound.GetHashCode();
            }
            if (HasUseClientId)
            {
                hash ^= UseClientId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #20
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Applications          = new Applications(this);
     Contacts              = new Contacts(this);
     Domains               = new Domains(this);
     Inbound               = new Inbound(this);
     Numbers               = new Numbers(this);
     Porting               = new Porting(this);
     SMS                   = new SMS(this);
     Trunks                = new Trunks(this);
     BaseUri               = new System.Uri("https://localhost");
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new  List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
コード例 #21
0
ファイル: InboundService.svc.cs プロジェクト: kurilovigor/snt
 public void ProcessInbound(Inbound.Документ s)
 {
     var userID = Helper.GetUserName();
     var userB2B = _Context.B2BUser.First(r => r.B2BUserID == userID);
     // Заказ
     var o = new Dme.Core.Order();
     o.UserID = userID;
     o.DT = DateTime.Now;
     o.CustOrderID = s.Номер;
     o.CustOrderDT = s.Дата;
     string orderTypeName = GetParameter(s, "Тип") ?? "Поставка";
     o.OrderType = _Context.OrderType.Where(ot=>ot.Name==orderTypeName && ot.Sign=="+").FirstOrDefault();
     if (o.OrderType == null)
         throw new Exception("Неизвестный тип документа");
     o.CustomerID = userB2B.CustomerID;
     var t = s.ТаблДок.First();
     // Отправитель
     o.Supplier = GetSupplier(s.Отправитель.First().СвЮЛ.First());
     // Строки
     int rowNo = 1;
     foreach (var r in t.СтрТабл)
     {
         var i = new Core.OrderDocRow();
         i.Partm = GetPartm(r);
         i.BatchNo = r.Серия;
         i.InvQual = r.Качество ?? "N";
         i.SpecInvID = r.Маркер;
         i.ExpireDT = r.СрокГодности;
         i.Qty = r.Кол_во;
         i.Price = r.Цена;
         i.RowNo = rowNo;
         o.OrderDocRow.Add(i);
         rowNo++;
     }
     // сохраняем изменения
     _Context.Order.Add(o);
 }
コード例 #22
0
ファイル: InboundService.svc.cs プロジェクト: kurilovigor/snt
 /// <summary>
 /// Возвращает запись поставщика из справочника. Если такой нет, то создает новую
 /// </summary>
 /// <param name="suppl"></param>
 /// <returns></returns>
 private Core.Customer GetSupplier(Inbound.СвЮЛ suppl)
 {
     Core.Customer cust = _Context.Customer.Where(c=>c.INN == suppl.ИНН).FirstOrDefault();
     if (cust == null)
     {
         cust = new Core.Customer();
         cust.INN = suppl.ИНН;
         cust.KPP = suppl.КПП;
         cust.OKDP = suppl.ОКДП;
         cust.OKPO = suppl.ОКПО;
         cust.Name = suppl.Название;
         _Context.Customer.Add(cust);
         _Context.SaveChanges();
     }
     return cust;
 }
コード例 #23
0
ファイル: InboundService.svc.cs プロジェクト: kurilovigor/snt
 /// <summary>
 /// Возвращает товар из справочника. Если такого нет, то создает новую запись
 /// </summary>
 /// <param name="r"></param>
 /// <returns></returns>
 private Dme.Core.Partm GetPartm(Inbound.СтрТабл r)
 {
     Dme.Core.Partm p;
     int partID = 0;
     string id1 = r.Код;
     if (id1 == null || id1 == string.Empty)
     {
         var y = r.Характеристика.Where(x => x.Имя == "КодСантэнс").FirstOrDefault();
         if (y == null)
             throw new Exception("Поле \"Код\" должно быть заполнено");
         else
             partID = Int32.Parse(y.Значение);
     }
     if (partID > 0)
     {
         p = _Context.Partm.FirstOrDefault(i => i.PartID == partID);
         if (p == null)
             throw new Exception(String.Format("Поле \"КодСантэнс\" содержит недопустимое значение {0}", partID));
     }
     else
     {
         p = _Context.Partm.FirstOrDefault(i => i.id1 == id1);
         if (p == null)
         {
             p = new Core.Partm();
             p.PartID = GetPartmNewID();
             p.partdsc = r.Название;
             p.partdsc2 = r.Производитель;
             p.id1 = id1;
             p.tempcl = r.ТемпРежим ?? "general";
             p.glass = r.Стекло ?? false;
             p.specaccount = r.Пку ?? false;
             p.hazcl = r.КлассОпасн ?? "general";
             p.minorder = r.МинЗаказ ?? 1;
             p.mulorder = r.КратнЗаказ ?? 1;
             _Context.Partm.Add(p);
             _Context.SaveChanges();
         }
     }
     return p;
 }
コード例 #24
0
ファイル: InboundService.svc.cs プロジェクト: kurilovigor/snt
 string GetParameter(Inbound.Документ s, string name, bool throwException = false)
 {
     var par = s.Параметр==null ? null : s.Параметр.FirstOrDefault(p => p.Имя == name);
     if (par == null)
     {
         if (throwException)
             throw new Exception(String.Format("Ожидается параметр документа \"{0}\"", name));
         else
             return null;
     }
     string result = par.Значение;
     return result;
 }
コード例 #25
0
ファイル: InboundService.svc.cs プロジェクト: kurilovigor/snt
 public Inbound.Файл ЗаказНаРазмещениеФайл(Inbound.Файл файл)
 {
     try
     {
         foreach (Inbound.Документ s in файл.Документ)
             ProcessInbound(s);
         Dme.Core.Helper.Entities.SaveChanges(_Context);
         return файл;
     }
     catch (Exception e)
     {
         StringBuilder sb = new StringBuilder();
         for (Exception err = e; err != null; err = err.InnerException)
         {
             sb.AppendLine(err.Message);
             sb.AppendLine(err.StackTrace);
             sb.AppendLine("===========================");
             sb.AppendLine();
         }
         throw new Exception(sb.ToString());
     }
 }
コード例 #26
0
 public void Start()
 {
     Inbound.Start();
     Outbound.Start();
 }
コード例 #27
0
 public void onInbound(long n)
 {
     Inbound?.Invoke(this, new Controller.RelayEventArgs(n));
 }
コード例 #28
0
 public void CompleteInbound(Ring ring, Exception error)
 {
     Inbound.Complete(error);
     CleanupSocketEnd(ring);
 }
コード例 #29
0
ファイル: InboundService.svc.cs プロジェクト: kurilovigor/snt
 public Inbound.Файл ЗаказНаРазмещениеДокумент(Inbound.Документ документ)
 {
     try
     {
         var result = new Inbound.Файл();
         result.Документ = new ДокументКоллекция();
         ProcessInbound(документ);
         result.Документ.Add(документ);
         Dme.Core.Helper.Entities.SaveChanges(_Context);
         return result;
     }
     catch (Exception e)
     {
         StringBuilder sb = new StringBuilder();
         for (Exception err = e; err != null; err = err.InnerException)
         {
             sb
                 .Append(err.Message)
                 .AppendLine(err.StackTrace)
                 .AppendLine("===========================")
                 .AppendLine();
         }
         throw new Exception(sb.ToString());
     }
 }
コード例 #30
0
 public void RemoveInstructionParams(Inbound packet)
 {
     instructionParams.Remove(packet);
 }
コード例 #31
0
ファイル: Channel.cs プロジェクト: minicheddar/hotfix
        /// <summary>
        /// Reads a message from the transport and returns true/false to indicate whether a valid message was read.
        /// </summary>
        /// <param name="message">The message to read into.</param>
        /// <returns>Whether a valid message was read.</returns>
        public bool Read(FIXMessage message)
        {
            if (_current == _head)
            {
                _head += Transport.Read(_buffer, _head, _buffer.Length - _head);
            }

            for (; _current < _head; _current++)
            {
                if (_current - _tail < 8)
                {
                    continue;
                }

                if (_buffer[_current - 0] != SOH)
                {
                    continue;
                }
                if (_buffer[_current - 4] != '=')
                {
                    continue;
                }
                if (_buffer[_current - 5] != '0')
                {
                    continue;
                }
                if (_buffer[_current - 6] != '1')
                {
                    continue;
                }
                if (_buffer[_current - 7] != SOH)
                {
                    continue;
                }

                message.Parse(_buffer, _tail, _current - _tail + 1);

                Inbound?.Invoke(_buffer, _tail, _current - _tail + 1);

                _tail = _current + 1;

                // If there's no more buffered data - reset the buffer
                if (_tail == _head)
                {
                    _tail = _head = _current = 0;
                }

                return(message.Valid);
            }

            // If there's no more buffer space - reset the buffer
            if (_head == _buffer.Length && _head == _current)
            {
                var buffered = _head - _tail;

                // NOTE: This may or may not be needed but we put it in for safety
                if (_tail < buffered)
                {
                    throw new Exception("Unable to reset buffer - not enough space");
                }

                Buffer.BlockCopy(_buffer, _tail, _buffer, 0, buffered);

                _tail = 0;
                _head = _current = buffered;
            }

            return(false);
        }
コード例 #32
0
 public void AddInstructionParams(Inbound packet, Action <object[]> d)
 {
     instructionParams.Add(packet, d);
 }
コード例 #33
0
 public InboundClientEventArgs(Inbound.FreeSwitch freeswitch)
 {
     _freeswitch = freeswitch;
 }
コード例 #34
0
 public virtual RaftMachineBuilder Inbound(Inbound <RaftMessages_RaftMessage> inbound)
 {
     this._inbound = inbound;
     return(this);
 }
コード例 #35
0
 public void Load()
 {
     Inbound.Load();
     Outbound.Load();
 }
コード例 #36
0
 public void onInbound(RelayEventArgs e)
 {
     Inbound?.Invoke(this, e);
 }
コード例 #37
0
 public int Read(byte[] buffer, int offset, int count)
 {
     return(Inbound.Read(buffer, offset, count));
 }