Exemplo n.º 1
0
        /// <summary>
        /// DeSerialize data in binary form adding it to the list that implements/ calls it
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        public bool BinaryDeSerialize(string fileName)
        {
            bool sucess = false;

            if (!string.IsNullOrEmpty(fileName))// if the file has a name we count it as sucess
            {
                sucess = true;
            }
            if (sucess)                                                                           // if we have sucess
            {
                adaptableList = BinSerializerUtility.BinaryFileDeSerialize <List <T> >(fileName); // load in the earlier serialized list into the application
            }
            return(sucess);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Serializes the data in the list
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        public bool BinarySerialize(string fileName)
        {
            bool sucess = false;

            if (!string.IsNullOrEmpty(fileName))// first we check so that the fileName is not empty or null
            {
                sucess = true;
            }
            if (sucess)
            {
                BinSerializerUtility.BinaryFileSerList(adaptableList, fileName);// drive the method in the utility class
            }
            return(sucess);
        }