Пример #1
0
        private object beginDeserialization(string answer)
        {
            XMLConverter    xc = new XMLConverter();
            JSONConverter   jc = new JSONConverter();
            BinaryConverter bc = new BinaryConverter();

            switch (answer)
            {
            case "xmlc":
                return(xc.readClient(filePath));

            case "xmlp":
                return(xc.readProduct(filePath));

            case "xmlt":
                return(xc.readTransaction(filePath));

            case "xmllc":
                return(xc.readClientsList(filePath));

            case "xmloct":
                return(xc.readTransactionsObservableCollection(filePath));

            case "xmldp":
                return(xc.readProductsDictionary(filePath));

            case "jsonc":
                return(jc.readClient(filePath));

            case "jsonp":
                return(jc.readProduct(filePath));

            case "jsont":
                return(jc.readTransaction(filePath));

            case "jsonlc":
                return(jc.readClientsList(filePath));

            case "jsonoct":
                return(jc.readTransactionsObservableCollection(filePath));

            case "jsondp":
                return(jc.readProductsDictionary(filePath));

            case "binc":
                return(bc.readClient(filePath));

            case "binp":
                return(bc.readProduct(filePath));

            case "bint":
                return(bc.readTransaction(filePath));

            case "binlc":
                return(bc.readClientsList(filePath));

            case "binoct":
                return(bc.readTransactionsObservableCollection(filePath));

            case "bindp":
                return(bc.readProductsDictionary(filePath));

            default:
                return(null);
            }
            ;
        }