CloneFromTo() 보호된 정적인 메소드

Copies all known values from one instance to another. Helper method for instance cloning.
protected static CloneFromTo ( [ from, [ to ) : void
from [
to [
리턴 void
예제 #1
0
        //--------------------//

        #region Clone
        /// <summary>
        /// Copies all known values from one instance to another. Helper method for instance cloning.
        /// </summary>
        protected static void CloneFromTo([NotNull] ImplementationBase from, [NotNull] ImplementationBase to)
        {
            #region Sanity checks
            if (from == null)
            {
                throw new ArgumentNullException("from");
            }
            if (to == null)
            {
                throw new ArgumentNullException("to");
            }
            #endregion

            Element.CloneFromTo(from, to);
            to.ID             = from.ID;
            to.LocalPath      = from.LocalPath;
            to.ManifestDigest = from.ManifestDigest;
        }