コード例 #1
0
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="other"></param>
 protected ObjectContainerImpl(ObjectContainerImpl <T> other)
     : base(other)
 {
     if (other.IsNull())
     {
         m_Object = null;
     }
     else
     {
         m_Object = (T)(other.m_Object.Clone());
     }
 }
コード例 #2
0
        /// <summary>
        /// Implementation of abstract in ContainerBase.
        /// </summary>
        /// <param name="other">ContainerBase</param>
        public override void Copy(ContainerBase other)
        {
            base.Copy(other);
            ObjectContainerImpl <T> that = other as ObjectContainerImpl <T>;

            if (that.IsNull())
            {
                m_Object = null;
            }
            else
            {
                InternalObj = that.m_Object.Clone();
            }
        }