Example #1
0
        /// <summary>
        /// Copies the array, creating new references
        /// </summary>
        /// <param name="oldData"></param>
        public static GasData Copy(this GasData oldData)
        {
            var newGasData = new GasData();

            foreach (var value in oldData.GasesArray)
            {
                newGasData.SetMoles(value.GasSO, value.Moles);
            }

            newGasData.RegenerateDict();

            return(newGasData);
        }
        /// <summary>
        /// Copies the array, creating new references
        /// </summary>
        /// <param name="oldData"></param>
        public static GasData CopyTo(this GasData oldData, GasData CopyTo)
        {
            CopyTo.Clear();

            foreach (var value in oldData.GasesArray)
            {
                CopyTo.SetMoles(value.GasSO, value.Moles);
            }

            CopyTo.RegenerateDict();

            return(CopyTo);
        }
Example #3
0
        /// <summary>
        /// Copies the array, creating new references
        /// </summary>
        /// <param name="oldData"></param>
        public static GasData CopyTo(this GasData oldData, GasData CopyTo)
        {
            CopyTo.Clear();

            var List = CopyGasArray(oldData);

            foreach (var value in List.List)
            {
                CopyTo.SetMoles(value.GasSO, value.Moles);
            }

            List.Pool();

            CopyTo.RegenerateDict();

            return(CopyTo);
        }
Example #4
0
        /// <summary>
        /// Copies the array, creating new references
        /// </summary>
        /// <param name="oldData"></param>
        public static GasData Copy(this GasData oldData)
        {
            var newGasData = new GasData();

            var List = CopyGasArray(oldData);

            foreach (var value in List.List)
            {
                newGasData.SetMoles(value.GasSO, value.Moles);
            }

            List.Pool();

            newGasData.RegenerateDict();

            return(newGasData);
        }