Example #1
0
        /// <summary>
        /// Creates the list of books through which the user can browse
        /// </summary>
        private void CreateBooksList()
        {
            m_Books = new NList <NBook>();

            m_Books.Add(new NBook(
                            "The Name Of The Wind",
                            "Patrick Rothfuss",
                            "This is the riveting first-person narrative of Kvothe, a young man who grows to be one of the most notorious magicians his world has ever seen. From his childhood in a troupe of traveling players, to years spent as a near-feral orphan in a crime-riddled city, to his daringly brazen yet successful bid to enter a legendary school of magic, The Name of the Wind is a masterpiece that transports readers into the body and mind of a wizard.",
                            Nevron.Nov.Examples.NResources.Image_Books_NameOfTheWind_jpg,
                            12.90));
            m_Books.Add(new NBook(
                            "Lord of Ohe Rings",
                            "J.R.R. Tolkien",
                            "In ancient times the Rings of Power were crafted by the Elven-smiths, and Sauron, the Dark Lord, forged the One Ring, filling it with his own power so that he could rule all others. But the One Ring was taken from him, and though he sought it throughout Middle-earth, it remained lost to him. After many ages it fell by chance into the hands of the hobbit Bilbo Baggins.",
                            NResources.Image_Books_LordOfTheRings_jpg,
                            13.99));
            m_Books.Add(new NBook(
                            "A Game Of Thrones",
                            "George R.R. Martin",
                            "Long ago, in a time forgotten, a preternatural event threw the seasons out of balance. In a land where summers can last decades and winters a lifetime, trouble is brewing. The cold is returning, and in the frozen wastes to the north of Winterfell, sinister and supernatural forces are massing beyond the kingdom’s protective Wall. At the center of the conflict lie the Starks of Winterfell, a family as harsh and unyielding as the land they were born to.",
                            NResources.Image_Books_AGameOfThrones_jpg,
                            12.79));
            m_Books.Add(new NBook(
                            "The Way Of Kings",
                            "Brandon Sanderson",
                            "Roshar is a world of stone and storms. Uncanny tempests of incredible power sweep across the rocky terrain so frequently that they have shaped ecology and civilization alike. Animals hide in shells, trees pull in branches, and grass retracts into the soilless ground. Cities are built only where the topography offers shelter.",
                            NResources.Image_Books_TheWayOfKings_jpg,
                            7.38));
            m_Books.Add(new NBook(
                            "Mistborn",
                            "Brandon Sanderson",
                            "For a thousand years the ash fell and no flowers bloomed. For a thousand years the Skaa slaved in misery and lived in fear. For a thousand years the Lord Ruler, the 'Sliver of Infinity' reigned with absolute power and ultimate terror, divinely invincible. Then, when hope was so long lost that not even its memory remained, a terribly scarred, heart-broken half-Skaa rediscovered it in the depths of the Lord Ruler’s most hellish prison. Kelsier 'snapped' and found in himself the powers of a Mistborn. A brilliant thief and natural leader, he turned his talents to the ultimate caper, with the Lord Ruler himself as the mark. ",
                            NResources.Image_Books_Mistborn_jpg,
                            6.38));
        }
        /// <summary>
        /// Creates a random minimum spannig tree (this ensures that the graph will be connected).
        /// </summary>
        /// <returns></returns>
        private static NList <NPointI> GetRandomMST(int vertexCount)
        {
            int             i, v1, v2;
            Random          random         = new Random();
            NList <NPointI> edges          = new NList <NPointI>();
            NList <int>     usedVertices   = new NList <int>();
            NList <int>     unusedVertices = new NList <int>(vertexCount);

            for (i = 0; i < vertexCount; i++)
            {
                unusedVertices.Add(i);
            }

            // Determine the root
            v1 = random.Next(vertexCount);
            usedVertices.Add(v1);
            unusedVertices.RemoveAt(v1);

            for (i = 1; i < vertexCount; i++)
            {
                v1 = random.Next(usedVertices.Count);
                v2 = random.Next(unusedVertices.Count);
                edges.Add(new NPointI(usedVertices[v1], unusedVertices[v2]));

                usedVertices.Add(unusedVertices[v2]);
                unusedVertices.RemoveAt(v2);
            }

            return(edges);
        }
Example #3
0
        private async Task SetKeyCol <TColValue, TPrimaryKey>(Nuid id, string table_name, TPrimaryKey primary_key, int col, TColValue col_value)
        {
            if (col_value == null)
            {
                _Logger.LogError($"{id} SetKeyCol {table_name} {primary_key}_{col} when col_value is null!");
                return;
            }

            if (NodeType == NodeType.Grain)
            {
                Entity entity = EntityManager.Get(id);
                if (entity == null)
                {
                    _Logger.LogError($"{id} SetKeyCol {table_name} {primary_key}_{col} when Grain dont found entity!");
                    return;
                }

                Table <TPrimaryKey> table = entity.GetTable(table_name) as Table <TPrimaryKey>;
                if (table == null)
                {
                    _Logger.LogError($"{id} SetKeyCol {table_name} {primary_key}_{col} when Grain dont found field!");
                    return;
                }

                NList result;
                if (!table.TrySetKeyCol(primary_key, col, col_value, out result))
                {
                    _Logger.LogError($"{id} SetKeyCol {table_name} {primary_key}_{col} when {col_value} TrySetRowCol failed!");
                    return;
                }

                await CallbackTable(id, table_name, TableEvent.SetCol, result);
            }
            else if (NodeType == NodeType.Cache)
            {
                NList value = await GetCacheTableKeyValue(id, table_name, primary_key);

                TColValue old_value = value.Get <TColValue>(col);
                if (old_value.Equals(col_value))
                {
                    _Logger.LogError($"{id} SetKeyCol {table_name} {primary_key}_{col} when new=old SetCacheRow failed!");
                }

                value.Set(col, col_value);

                if (!await SetCacheTableKeyValue(id, table_name, primary_key, value))
                {
                    _Logger.LogError($"{id} SetKeyCol {table_name} {primary_key}_{col} when {value} SetCacheTableKeyValue failed!");
                    return;
                }

                NList result = NList.New();
                result.Add(primary_key);
                result.Add(col);
                result.Add(old_value);
                result.Add(col_value);

                await CallbackTable(id, table_name, TableEvent.SetCol, result);
            }
        }
Example #4
0
        public async Task SetRowCol <T>(Nuid id, string table_name, long row, int col, T value)
        {
            if (value == null)
            {
                return;
            }

            Entity entity = EntityManager.Get(id);

            if (entity != null)
            {
                Table table = entity.GetTable(table_name);
                if (table == null)
                {
                    return;
                }

                NList result;
                if (!table.TrySetRowCol(row, col, value, out result))
                {
                    return;
                }

                NList row_value = table.GetRow(row);
                BatchCahceList.Add(NList.New().Add((int)CacheOption.SetRow).Add(id).Add(table_name).Add(row).Add(row_value));
                await CallbackTable(id, table_name, TableEvent.SetCol, result);
            }
            else
            {
                if (id.Origin == Identity)
                {
                    NList row_value = NList.New();
                    NList old_value = await GetCacheRowValue(id, table_name, row);

                    T old_row_value = old_value.Get <T>(col);
                    row_value.Append(old_value);
                    row_value.Set(col, value);

                    if (await SetCacheRow(id, table_name, row, row_value))
                    {
                        NList result = NList.New();
                        result.Add(row);
                        result.Add(col);
                        result.Add(old_row_value);
                        result.Add(value);

                        await CallbackTable(id, table_name, TableEvent.SetCol, result);
                    }
                }
                else
                {
                    INode node = GrainFactory.GetGrain <INode>(id.Origin);
                    await node.SetRowCol(id, table_name, row, col, value);
                }
            }
        }
        public void AddItemToEndOfList()
        {
            int         num1 = 20;
            int         num2 = 30;
            NList <int> nums = new NList <int>();

            nums.Add(num1);
            nums.Add(num2);

            Assert.AreEqual(num2, nums[1]);
        }
Example #6
0
        public void SendSmsTest()
        {
            var phone = new NList();

            phone.Add("138xxxxxxxx");
            phone.Add("189xxxxxxxx");
            var content  = "你好,Ucloud";
            var entity   = new SMSRequest(phone, content);
            var response = ucloud.SendSms(entity);

            Assert.AreEqual(response.RetCode, 0);
        }
Example #7
0
        protected override NWidget CreateExampleControls()
        {
            NStackPanel stack = new NStackPanel();

            for (int i = 0, count = m_PairBoxes.Length; i < count; i++)
            {
                // Create the pair box property editors
                NPairBox pairBox = m_PairBoxes[i];
                NList <NPropertyEditor> editors = NDesigner.GetDesigner(pairBox).CreatePropertyEditors(pairBox,
                                                                                                       NPairBox.FillModeProperty,
                                                                                                       NPairBox.FitModeProperty
                                                                                                       );

                NUniSizeBox box1 = (NUniSizeBox)pairBox.Box1;
                editors.Add(NDesigner.GetDesigner(box1).CreatePropertyEditor(
                                box1,
                                NUniSizeBox.UniSizeModeProperty
                                ));

                NUniSizeBox box2 = (NUniSizeBox)pairBox.Box2;
                editors.Add(NDesigner.GetDesigner(box2).CreatePropertyEditor(
                                box2,
                                NUniSizeBox.UniSizeModeProperty
                                ));

                // Create the properties stack panel
                NStackPanel propertyStack = new NStackPanel();
                for (int j = 0, editorCount = editors.Count; j < editorCount; j++)
                {
                    propertyStack.Add(editors[j]);
                }

                // Add the box 1 preferred height editor
                NPropertyEditor editor = NDesigner.GetDesigner(box1.Content).CreatePropertyEditor(box1.Content, NWidget.PreferredHeightProperty);
                NLabel          label  = editor.GetFirstDescendant <NLabel>();
                label.Text = "Box 1 Preferred Height:";
                propertyStack.Add(editor);

                // Add the box 2 preferred height editor
                editor     = NDesigner.GetDesigner(box2.Content).CreatePropertyEditor(box2.Content, NWidget.PreferredHeightProperty);
                label      = editor.GetFirstDescendant <NLabel>();
                label.Text = "Box 2 Preferred Height:";
                propertyStack.Add(editor);

                // Create a group box for the properties
                NGroupBox groupBox = new NGroupBox("Pair Box " + (i + 1).ToString());
                groupBox.Content = propertyStack;
                stack.Add(groupBox);
            }

            return(new NUniSizeBoxGroup(stack));
        }
Example #8
0
        public async Task DelKey <TPrimaryKey>(Nuid id, string table_name, TPrimaryKey primary_key)
        {
            if (id.Origin != Identity)
            {
                INode node = GrainFactory.GetGrain <INode>(id.Origin);
                await node.DelKey(id, table_name, primary_key);

                return;
            }

            if (NodeType == NodeType.Grain)
            {
                Entity entity = EntityManager.Get(id);
                if (entity == null)
                {
                    _Logger.LogError($"{id} DelKey {table_name} when Grain dont found entity!");
                    return;
                }

                Table <TPrimaryKey> table = entity.GetTable(table_name) as Table <TPrimaryKey>;
                if (table == null)
                {
                    _Logger.LogError($"{id} DelKey {table_name} when Grain dont found table!");
                    return;
                }

                NList result;
                if (!table.TryDelKey(primary_key, out result))
                {
                    _Logger.LogError($"{id} DelKey {table_name} {primary_key} when Grain dont found primary_key!");
                    return;
                }

                await CallbackTable(id, table_name, TableEvent.DelKey, result);
            }
            else if (NodeType == NodeType.Cache)
            {
                NList row_value = await GetCacheTableKeyValue(id, table_name, primary_key);

                if (!await DelCacheTableKey(id, table_name, primary_key))
                {
                    _Logger.LogError($"{id} DelCacheTableKey {table_name} {primary_key} when Grain dont found row!");
                    return;
                }

                NList result = NList.New();
                result.Add(primary_key);
                result.Add(row_value);
                await CallbackTable(id, table_name, TableEvent.DelKey, result);
            }
        }
Example #9
0
        public async Task AddKeyValue <TPrimaryKey>(Nuid id, string table_name, TPrimaryKey primary_key, NList value)
        {
            if (id.Origin != Identity)
            {
                INode node = GrainFactory.GetGrain <INode>(id.Origin);
                await node.AddKeyValue(id, table_name, primary_key, value);

                return;
            }

            if (NodeType == NodeType.Grain)
            {
                Entity entity = EntityManager.Get(id);
                if (entity == null)
                {
                    _Logger.LogError($"{id} AddKeyValue {table_name} when Grain dont found entity!");
                    return;
                }

                Table <TPrimaryKey> table = entity.GetTable(table_name) as Table <TPrimaryKey>;
                if (table == null)
                {
                    _Logger.LogError($"{id} AddKeyValue {table_name} when Grain dont found table!");
                    return;
                }

                NList result;
                if (!table.TrySetKeyValue(primary_key, value, out result))
                {
                    _Logger.LogError($"{id} AddKeyValue {table_name} when Grain found row exist {primary_key}!");
                    return;
                }

                await CallbackTable(id, table_name, TableEvent.AddKey, result);
            }
            else if (NodeType == NodeType.Cache)
            {
                if (!await SetCacheTableKeyValue(id, table_name, primary_key, value))
                {
                    _Logger.LogError($"{id} AddKeyValue {table_name} when SetCacheTableKeyValue failed {primary_key} {value}!");
                    return;
                }

                NList result = NList.New();
                result.Add(primary_key);
                result.Add(value);

                await CallbackTable(id, table_name, TableEvent.AddKey, result);
            }
        }
Example #10
0
        private async Task SetField <T>(Nuid id, string field_name, T field_value)
        {
            if (field_value == null)
            {
                _Logger.LogError($"{id} SetField {field_name} when field_value is null!");
                return;
            }

            if (NodeType == NodeType.Grain)
            {
                Entity entity = EntityManager.Get(id);
                if (entity == null)
                {
                    _Logger.LogError($"{id} SetField {field_name} when Grain dont found entity!");
                    return;
                }

                Field field = entity.GetField(field_name);
                if (field == null)
                {
                    _Logger.LogError($"{id} SetField {field_name} when Grain dont found field!");
                    return;
                }

                NList result;
                if (!field.TrySet(field_value, out result))
                {
                    _Logger.LogError($"{id} SetField {field_name} when {field_value} TrySet failed!");
                    return;
                }

                await CallbackField(id, field_name, FieldEvent.Change, result);
            }
            else if (NodeType == NodeType.Cache)
            {
                T old_value = await GetCacheField <T>(id, field_name);

                if (!await SetCacheField(id, field_name, field_value))
                {
                    return;
                }

                NList result = NList.New();
                result.Add(old_value);
                result.Add(field_value);
                await CallbackField(id, field_name, FieldEvent.Change, result);
            }
        }
Example #11
0
        public async Task SetField <T>(Nuid id, string field_name, T field_value)
        {
            if (field_value == null)
            {
                return;
            }

            Entity entity = EntityManager.Get(id);

            if (entity != null)
            {
                Field field = entity.GetField(field_name);
                if (field == null)
                {
                    return;
                }

                NList result;
                if (!field.TrySet(field_value, out result))
                {
                    return;
                }

                BatchCahceList.Add(NList.New().Add((int)CacheOption.SetField).Add(id).Add(field_name).Add(ProtoUtils.Serialize(field_value)));

                await CallbackField(id, field_name, FieldEvent.Change, result);
            }
            else
            {
                if (id.Origin == Identity)
                {
                    T old_value = await GetCacheField <T>(id, field_name);

                    if (await SetCacheField(id, field_name, field_value))
                    {
                        NList result = NList.New();
                        result.Add(old_value);
                        result.Add(field_value);
                        await CallbackField(id, field_name, FieldEvent.Change, result);
                    }
                }
                else
                {
                    INode node = GrainFactory.GetGrain <INode>(id.Origin);
                    await node.SetField(id, field_name, field_value);
                }
            }
        }
        public async Task Init()
        {
            HttpResponseMessage IzlazistavkeResponse;

            IzlazistavkeResponse = izlaziStavkeService.GetActionResponseID("GetIzlazStavkeCustom", Izlazhlp.IzlazID);
            List <IzlazStavke> aktivne = IzlazistavkeResponse.Content.ReadAsAsync <List <IzlazStavke> >().Result;

            foreach (var x in aktivne)
            {
                Izlazhlp.IzlazStavke.Add(x);
            }
            foreach (var y in Izlazhlp.IzlazStavke)
            {
                HttpResponseMessage list;
                list = proizvodiService.GetActionResponseID("GetProizvodiCustom", y.ProizvodID);
                Proizvodi Proizvod = list.Content.ReadAsAsync <Proizvodi>().Result;


                NList.Add(Proizvod);
            }
            HttpResponseMessage list2;

            list2 = ambalazaService.GetResponse();
            List <Ambalaza> vplist = list2.Content.ReadAsAsync <List <Ambalaza> >().Result;

            AmbList.Add(new Ambalaza {
                AmbalazaId = 0, Naziv = "Odaberite stavku"
            });
            foreach (var item in vplist)
            {
                AmbList.Add(item);
            }
        }
        /// <summary>
        /// スネークケースに変換する。
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public static string CamelToSnake(string str, bool isUpper = false)
        {
            var charList = new NList <char>();

            foreach (var item in str)
            {
                charList.Add(item);
            }
            int index  = 1;
            var target = new NList <char>();

            for (int i = 0; i < charList.Count; i++)
            {
                var item     = charList[i];
                var nextItem = (charList.Count > i + 1)? charList[i + 1] : new char();
                target.Add(item);
                if (!charList.IsLast(item) && abcUpperList.Contains(nextItem))
                {
                    target.Insert(index, '_');
                    index++;
                }
                index++;
            }
            var res = new string(target.ToArray());

            return(isUpper ? res.ToUpper()
                : res.ToLower()
                   );
        }
Example #14
0
        static NCalendarExample()
        {
            NCalendarExampleSchema = NSchema.Create(typeof(NCalendarExample), NExampleBase.NExampleBaseSchema);

            // Fill the list of cultures
            string[] cultureNames = new string[] { "en-US", "en-GB", "fr-FR", "de-DE", "es-ES", "ru-RU", "zh-CN", "ja-JP",
                                                   "it-IT", "hi-IN", "ar-AE", "he-IL", "id-ID", "ko-KR", "pt-BR", "sv-SE", "tr-TR", "pt-BR", "bg-BG", "ro-RO",
                                                   "pl-PL", "nl-NL", "cs-CZ" };
            Cultures = new NList <CultureInfo>();

            for (int i = 0, count = cultureNames.Length; i < count; i++)
            {
                CultureInfo cultureInfo;
                try
                {
                    cultureInfo = new CultureInfo(cultureNames[i]);
                }
                catch
                {
                    cultureInfo = null;
                }

                if (cultureInfo != null && Cultures.Contains(cultureInfo) == false)
                {
                    Cultures.Add(cultureInfo);
                }
            }

            // Sort the cultures by their English name
            Cultures.Sort(new NCultureNameComparer());
        }
Example #15
0
 private FilterItem copyFilterItem(FilterItem item, Object[] values, NAtomicInteger parameterIndex)
 {
     if (item.isCompoundFilter())
     {
         FilterItem[] childItems    = item.getChildItems();
         FilterItem[] newChildItems = new FilterItem[childItems.Length];
         for (int i = 0; i < childItems.Length; i++)
         {
             FilterItem childItem    = childItems[i];
             FilterItem newChildItem = copyFilterItem(childItem, values, parameterIndex);
             newChildItems[i] = newChildItem;
         }
         NList <FilterItem> elements = new NList <FilterItem>();
         foreach (FilterItem element in newChildItems)
         {
             elements.Add(element);
         }
         FilterItem newFilter = new FilterItem(item.getLogicalOperator(), elements);
         return(newFilter);
     }
     else
     {
         if (item.getOperand() is QueryParameter)
         {
             Object     newOperand = values[parameterIndex.getAndIncrement()];
             FilterItem newFilter  = new FilterItem(item.getSelectItem(), item.getOperator(), newOperand);
             return(newFilter);
         }
         else
         {
             return(item);
         }
     }
 } // copyFilterItem()
        /// <summary>
        ///
        /// </summary>
        private void FillRandomData()
        {
            NList <NBarSeries> barSeriesList = new NList <NBarSeries>();

            // collect all bar series in the view
            for (int chartIndex = 0; chartIndex < m_ChartView.Surface.Charts.Length; chartIndex++)
            {
                NCartesianChart chart = (NCartesianChart)m_ChartView.Surface.Charts[chartIndex];

                for (int seriesIndex = 0; seriesIndex < chart.Series.Count; seriesIndex++)
                {
                    NBarSeries barSeries = chart.Series[seriesIndex] as NBarSeries;

                    if (barSeries != null)
                    {
                        barSeriesList.Add(barSeries);
                        barSeries.DataPoints.Clear();
                    }
                }
            }

            // fill all bar series with random data
            Random random = new Random();

            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < barSeriesList.Count; j++)
                {
                    NBarSeries barSeries = barSeriesList[j];
                    barSeries.DataPoints.Add(new NBarDataPoint(random.Next(10, 100)));
                }
            }
        }
        public void CountIncreases()
        {
            int num1 = 12;
            int num2 = 20;
            int firstCount;
            int secondCount;

            NList <int> nums = new NList <int>();

            nums.Add(num1);
            firstCount = nums.Count;

            nums.Add(num2);
            secondCount = nums.Count;

            Assert.Greater(secondCount, firstCount);
        }
        public void CountIncreasesBy1()
        {
            int num1 = 20;
            int num2 = 24;
            int firstCount;
            int secondCount;

            NList <int> nums = new NList <int>();

            nums.Add(num1);
            firstCount = nums.Count;

            nums.Add(num2);
            secondCount = nums.Count;

            Assert.AreEqual(2, secondCount);
        }
        public void UpdatesCount()
        {
            int num1 = 12;
            int num2 = 20;
            int firstCount;
            int secondCount;

            NList <int> nums = new NList <int>();

            nums.Add(num1);
            firstCount = nums.Count;

            nums.Add(num2);
            secondCount = nums.Count;

            Assert.AreNotEqual(firstCount, secondCount);
        }
Example #20
0
        public async Task <long> AddRow(Nuid id, string table_name, NList value)
        {
            if (NList.IsEmpty(value))
            {
                return(Global.INVALID_ROW);
            }

            Entity entity = EntityManager.Get(id);

            if (entity != null)
            {
                Table table = entity.GetTable(table_name);
                if (table == null)
                {
                    return(Global.INVALID_ROW);
                }

                NList result;
                if (!table.TryAddRow(value, out result))
                {
                    return(Global.INVALID_ROW);
                }

                long  row       = result.Get <long>(0);
                NList row_value = result.Get <NList>(1);
                BatchCahceList.Add(NList.New().Add((int)CacheOption.SetRow).Add(id).Add(table_name).Add(row).Add(row_value));

                await CallbackTable(id, table_name, TableEvent.AddRow, result);

                return(row);
            }
            else
            {
                if (id.Origin == Identity)
                {
                    long row = IdUtils.RGen.CreateId();
                    if (await SetCacheRow(id, table_name, row, value))
                    {
                        NList result = NList.New();
                        result.Add(row);
                        result.Append(value);

                        await CallbackTable(id, table_name, TableEvent.AddRow, result);

                        return(row);
                    }
                    else
                    {
                        return(Global.INVALID_ROW);
                    }
                }
                else
                {
                    INode node = GrainFactory.GetGrain <INode>(id.Origin);
                    return(await node.AddRow(id, table_name, value));
                }
            }
        }
 public override void decorateIdentity(NList <object> identifiers)
 {
     identifiers.Add(_underline);
     identifiers.Add(_italic);
     identifiers.Add(_bold);
     identifiers.Add(_fontSize);
     identifiers.Add(_fontSizeUnit);
     identifiers.Add(_alignment);
     identifiers.Add(_backgroundColor);
     identifiers.Add(_foregroundColor);
 } // decorateIdentity()
        public void AddItemToEmptyList()
        {
            int         num  = 12;
            NList <int> nums = new NList <int>();


            nums.Add(num);

            Assert.AreEqual(num, nums[0]);
        }
        public void ChangesValueAtIndex()
        {
            int num1 = 10;
            int num2 = 20;
            int num3 = 30;

            NList <int> nums = new NList <int>();

            nums.Add(num1);
            nums.Add(num2);
            nums.Add(num3);

            for (int i = 0; i < 50; i++)
            {
                nums[i] += 5;
            }

            Assert.AreEqual(25, nums[1]);
        }
        public void IndexerIsZeroBased()
        {
            int num1 = 20;

            NList <int> nums = new NList <int>();

            nums.Add(num1);

            Assert.AreEqual(num1, nums[0]);
        }
        public void GetsCount()
        {
            int num1 = 12;

            NList <int> nums = new NList <int>();

            nums.Add(num1);
            Console.ReadLine();
            Assert.AreEqual(1, nums.Count);
        }
        public void CountAfterIteration()
        {
            NList <int> nums = new NList <int>();

            for (int i = 0; i < 6; i++)
            {
                nums.Add(i);
            }

            Assert.AreEqual(6, nums.Count);
        }
        public void IndexWithDoubleDigits()
        {
            NList <int> nums = new NList <int>();

            for (int i = 0; i < 51; i++)
            {
                nums.Add(i + 1);
            }

            Assert.AreEqual(49, nums[48]);
        }
        public void IndexOfDoubleDigits()
        {
            NList <int> nums = new NList <int>();

            for (int i = 0; i < 16; i++)
            {
                nums.Add(i + 1);
            }

            Assert.AreEqual(15, nums[14]);
        }
        public void AddWithEnumerator()
        {
            NList <int> nums = new NList <int>()
            {
                1, 2, 3
            };

            nums.Add(4);

            Assert.AreEqual(4, nums[3]);
        }
        public void Index0AfterAddMoreThan50Items()
        {
            NList <int> nums = new NList <int>();

            for (int i = 0; i <= 55; i++)
            {
                nums.Add(i);
            }

            Assert.AreEqual(0, nums[0]);
        }