Ejemplo n.º 1
0
        public static TestBlock GetBlockFromContent(string[] content, ref int enterPoint)
        {
            string[]  testBlockAsRow = SearchBlockInContent(content, ref enterPoint);
            TestBlock testBlock      = new TestBlock(testBlockAsRow);

            return(testBlock);
        }
Ejemplo n.º 2
0
        private List <TestBlock> GetTestBlock(string[] content)
        {
            int numTestBlocks;
            int enterPoint = 1;
            List <TestBlock> testBlocks = new List <TestBlock>();

            numTestBlocks = Processing.ConvertStrToInt(content[0]);

            for (int i = 0; i < numTestBlocks; i++)
            {
                TestBlock regTestBlock = Processing.GetBlockFromContent(content, ref enterPoint);
                testBlocks.Add(regTestBlock);
            }
            return(testBlocks);
        }
Ejemplo n.º 3
0
 private void StartRegularElections(TestBlock testBlock)
 {
     testBlock.StartElections();
 }