示例#1
0
 public void Print(IDataset data)
 {
     if (data.GetData() == null)
     {
         Console.WriteLine("No right of access.");
         return;
     }
     foreach (List <string> current in data.GetData())
     {
         foreach (string innerCurrent in current)
         {
             Console.Write(innerCurrent + ", ");
         }
         Console.WriteLine();
     }
 }
        public void PrintDataConsole(IDataset data)
        {
            if (data.GetData() == null)
            {
                Console.WriteLine("Error 404");
                return;
            }

            foreach (List <string> dataConsole in data.GetData())
            {
                foreach (string dataConsolePrinter in dataConsole)
                {
                    Console.WriteLine(dataConsolePrinter + ", ");
                }
                Console.WriteLine();
            }
        }
示例#3
0
        public void printData(IDataset dataset)
        {
            if (dataset.GetData() == null)
            {
                Console.WriteLine("Ne možete pristupiti podacima!");
                return;
            }
            StringBuilder stringBuilder = new StringBuilder();

            foreach (List <string> row in dataset.GetData())
            {
                foreach (string word in row)
                {
                    stringBuilder.Append(word).Append(' ');
                }
                stringBuilder.Append('\n');
            }
            Console.WriteLine(stringBuilder.ToString());
        }
示例#4
0
 public void GetData(IDataset dataset)
 {
     foreach (List <string> list in dataset.GetData())
     {
         foreach (string data in list)
         {
             Console.Write("{0} ", data);
         }
         Console.WriteLine();
     }
 }
        public void PrintDataToConsole(IDataset data)
        {
            if (data.GetData() == null)
            {
                Console.WriteLine("Permission denied/No Data");
            }
            else
            {
                Console.WriteLine(data.GetData());
                for (int i = 0; i < data.GetData().Count; i++)
                {
                    for (int j = 0; j < data.GetData()[0].Count; j++)
                    {
                        Console.WriteLine(data.GetData()[i][j]);
                    }

                    Console.WriteLine();
                }
            }
        }
示例#6
0
        public void PrintData(IDataset data)
        {
            ReadOnlyCollection <List <string> > collection = data.GetData();

            foreach (List <String> list in collection)
            {
                foreach (string item in list)
                {
                    Console.Write(item + ", ");
                }
                Console.WriteLine();
            }
        }
示例#7
0
        public void DisplayItems(IDataset proxy)
        {
            IList <List <string> > listdata = proxy.GetData();

            foreach (List <string> liststring in listdata)
            {
                foreach (string str in liststring)
                {
                    Console.Write(str + " ");
                }
                Console.WriteLine("\n");
            }
        }
示例#8
0
        public void PrintInConsole(IDataset dataset)
        {
            ReadOnlyCollection <List <string> > dataList = dataset.GetData();

            foreach (List <string> list in dataList)
            {
                foreach (string item in list)
                {
                    Console.Write(item + " ");
                }
                Console.WriteLine();
            }
        }
        public void Print(IDataset data)
        {
            IReadOnlyCollection <List <string> > items = data.GetData();

            if (items == null)
            {
                Console.WriteLine("No data available!");
                return;
            }
            foreach (List <string> item in items)
            {
                foreach (string line in item)
                {
                    Console.Write(line + " ");
                }
                Console.WriteLine();
            }
        }
示例#10
0
        public void Print(IDataset data)
        {
            IReadOnlyCollection <List <string> > Data = data.GetData();

            if (Data == null)
            {
                Console.WriteLine("Empty");
                return;
            }
            foreach (List <string> lines in Data)
            {
                foreach (string line in lines)
                {
                    Console.Write(line + " ");
                }
                Console.WriteLine();
            }
        }
示例#11
0
 public static void printData(IDataset dataset)
 {
     try
     {
         List <List <string> > print = new List <List <string> >(dataset.GetData());
         foreach (List <string> list in print)
         {
             foreach (string s in list)
             {
                 Console.WriteLine(s);
             }
             Console.WriteLine("/n");
         }
     }catch (Exception e)
     {
         throw new ArgumentException("Unkown type");
     }
 }
示例#12
0
        public void PrintDataset(IDataset d)
        {
            ReadOnlyCollection <List <string> > dataset = d.GetData();

            if (dataset == null)
            {
                Console.WriteLine("Dataset is null. This could be because the user was not authorised.");
                return;
            }

            foreach (List <string> stringList in dataset)
            {
                foreach (string s in stringList)
                {
                    Console.Write(s + "\t");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
示例#13
0
        public void Print(IDataset dataset)
        {
            ReadOnlyCollection <List <string> > tempDataset = dataset.GetData();

            if (IsNull(tempDataset))
            {
                Console.WriteLine("Dataset is unavailable!");
            }
            else
            {
                foreach (List <string> data in tempDataset)
                {
                    foreach (string unit in data)
                    {
                        Console.Write(unit + ", ");
                    }
                    Console.Write(Environment.NewLine);
                }
            }
        }
示例#14
0
        public void PrintData(IDataset dataset)
        {
            ReadOnlyCollection <List <string> > data = dataset.GetData();

            if (data == null)
            {
                Exception exception = new Exception("Can't find data");
                throw exception;
            }
            else
            {
                for (int i = 0; i < data.Count; i++)
                {
                    foreach (string dataPart in data[i])
                    {
                        Console.Write(dataPart + " ");
                    }
                    Console.Write("\n");
                }
            }
        }
示例#15
0
        public static void dataPrint(IDataset dataset)
        {
            ReadOnlyCollection <List <string> > data = dataset.GetData();

            if (data == null)
            {
                Console.WriteLine("Error");
                return;
            }
            else
            {
                foreach (List <string> list in data)
                {
                    foreach (string s in list)
                    {
                        Console.Write(s + " ");
                    }
                    Console.WriteLine();
                }
            }
        }
示例#16
0
        public void PrintData(IDataset dataset)
        {
            try
            {
                IReadOnlyCollection <List <string> > dataToPrint = dataset.GetData();

                if (dataToPrint == null)
                {
                    throw new NullReferenceException();
                }

                foreach (var data in dataToPrint)
                {
                    foreach (string item in data)
                    {
                        Console.WriteLine(item);
                    }
                }
            }
            catch (NullReferenceException exception)
            {
                Console.WriteLine("You don't have a permission for this action!");
            }
        }