コード例 #1
0
 public HotstringSimple(hotstring hs) : this()
 {
     this.m_Category    = hs.category;
     this.m_Description = hs.description;
     this.m_Name        = hs.name;
     this.m_Trigger     = hs.trigger;
     this.m_Enabled     = hs.enabled;
 }
コード例 #2
0
        /// <summary>
        /// Populates instance class with another instance of class
        /// </summary>
        /// <param name="oth">The other instance to populate from</param>
        /// <param name="IgnoreArray">If True then Arrays are Ignored; Otherwise arrays are included</param>
        public void Populate(hotstring oth, bool IgnoreArray)
        {
            foreach (PropertyInfo sourcePropertyInfo in oth.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
            {
                if (sourcePropertyInfo.Name == @"Parent")
                {
                    continue;
                }
                if ((IgnoreArray == true) && (sourcePropertyInfo.PropertyType.IsArray == true))
                {
                    continue;
                }
                PropertyInfo destPropertyInfo = this.GetType().GetProperty(sourcePropertyInfo.Name);

                if (destPropertyInfo.CanWrite == true)
                {
                    destPropertyInfo.SetValue(
                        this,
                        sourcePropertyInfo.GetValue(oth, null),
                        null);
                }
            }
        }
コード例 #3
0
 /// <summary>
 /// Populates instance class with another instance of class, Arrays are Ignored
 /// </summary>
 /// <param name="oth">The other instance to populate from</param>
 public void Populate(hotstring oth)
 {
     Populate(oth, true);
 }
コード例 #4
0
 public HotstringSimple(hotstring hs, string FileName) : this(hs)
 {
     this.m_File = FileName;
 }