Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="_name"></param>
        /// <param name="_values"></param>
        public void Add <T>(string _name, List <T> _values) where T : ITGSerializable, new()
        {
            TGListWrapper <T> wrapper = new TGListWrapper <T>(_values);

            TGSerializedObject obj = wrapper.GetTGSerializedObject();

            Properties.Add(_name, new TGSerializedProperty(_name, obj.ToString()));
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="_name"></param>
        /// <returns></returns>
        public List <T> GetListITGSerializableObject <T>(string _name) where T : ITGSerializable, new()
        {
            if (Properties.ContainsKey(_name))
            {
                string            temp    = Properties[_name].SerializedValue;
                TGListWrapper <T> wrapper = new TGListWrapper <T>(temp);
                return(wrapper.Values);
            }

            return(new List <T>());
        }