Exemple #1
0
        private bool Add(List<NNTPSegment> cList)
        {
            long cSize = 0;
            List<IndexedObject> cOut = new List<IndexedObject>();

            if (cList == null) { return false; }
            if (cList.Count == 0) { return false; }

            Common.Safe32(ref zTotal, cList.Count);

            cList.Sort();

            foreach (NNTPSegment nS in cList)
            {
                if (nS.Commands != null)
                {
                    cOut.Add(new NNTPCommands(nS.Commands, this));
                }
                else
                {
                    cSize += nS.ExpectedSize;
                    if (nS.Command.Length == 0) { return false; }
                    List<string> cCom = new List<string>();
                    cCom.Add(nS.Command);
                    cOut.Add(new NNTPCommands(cCom, this, nS.ExpectedSize));
                }

            }

            Common.Safe32(ref zExpected, cSize);
            zCol = new IndexedCollection(cOut);
            return true;
        }
Exemple #2
0
        internal NNTPOutput(int lTotal, string sFile)
        {
            zTotal    = lTotal;
            Filename  = sFile;
            bFinished = false;

            zOut = new MemoryStream();
            zCol = new IndexedCollection(zTotal);
        }
Exemple #3
0
        internal VirtualSlot(string sName, List<VirtualFile> cList, ManualResetEventSlim WaitHandle = null)
        {
            zName = sName;
            zWait = WaitHandle;
            zStats = new Stats();

            if (zWait == null) { zWait = new ManualResetEventSlim(); }
            zCol = new IndexedCollection(cList.Cast<IndexedObject>().ToList());
        }
Exemple #4
0
 internal Connections(Scheduler lServers)
 {
     zServers = lServers;
     zCol     = new IndexedCollection();
 }
Exemple #5
0
 internal Slots()
 {
     zUptime = DateTime.UtcNow.Ticks;
     zCol = new IndexedCollection();
     Log = new ConcurrentQueue<string>();
 }