Esempio n. 1
0
        private void RemoveActionInfoCommon(TLVector <TLActionInfo> actions, TLObject obj)
        {
            for (var i = 0; i < actions.Count; i++)
            {
                if (actions[i].Action.GetType() == obj.GetType())
                {
                    if (actions[i].Action == obj)
                    {
                        actions.RemoveAt(i--);
                        continue;
                    }

                    var randomId1 = actions[i].Action as ITLRandomId;
                    var randomId2 = obj as ITLRandomId;
                    if (randomId1 != null &&
                        randomId2 != null &&
                        randomId1.RandomId.Value == randomId2.RandomId.Value)
                    {
                        actions.RemoveAt(i--);
                        continue;
                    }
                }
            }
        }