Esempio n. 1
0
        /// <summary>
        /// Creates a new instance of this MemberImporter
        /// </summary>
        /// <param name="member">Member to import</param>
        /// <param name="destination">Destination of the importing</param>
        /// <param name="session">Importing session</param>
        public MemberImporter(IMetadataTokenProvider member, IMetadataTokenProvider destination, MemberImportingSession session)
        {
            //Checks if the member can be imported (and that member and destination aren't null)
            if (!CanImport(member, destination))
                throw new ArgumentException(string.Format("{0} cannot import '{1}' into '{2}'", this.GetType().Name, member, destination));

            //Stores member and destination
            _member = member;
            _destination = destination;
            _Session = session;
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new instance of this MemberImporter
        /// </summary>
        /// <param name="member">Member to import</param>
        /// <param name="destination">Destination of the importing</param>
        /// <param name="session">Importing session</param>
        public MemberImporter(IMetadataTokenProvider member, IMetadataTokenProvider destination, MemberImportingSession session)
        {
            //Checks if the member can be imported (and that member and destination aren't null)
            if (!CanImport(member, destination))
            {
                throw new ArgumentException(string.Format("{0} cannot import '{1}' into '{2}'", this.GetType().Name, member, destination));
            }

            //Stores member and destination
            _member      = member;
            _destination = destination;
            _Session     = session;
        }
Esempio n. 3
0
 /// <summary>
 /// Creates a new instance of this MemberImporter
 /// </summary>
 /// <param name="member">Member to import</param>
 /// <param name="session">Importing session</param>
 public MemberImporter(IMetadataTokenProvider member, MemberImportingSession session)
     : this(member, session.Destination, session)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new instance of this MemberImporter
 /// </summary>
 /// <param name="member">Member to import</param>
 /// <param name="session">Importing session</param>
 public MemberImporter(IMetadataTokenProvider member, MemberImportingSession session)
     : this(member, session.Destination, session)
 {
 }