Dependency ICloneable<Dependency>.Clone()
 {
     var dependency = new Dependency {InterfaceUri = InterfaceUri, OS = OS, Versions = Versions, Importance = Importance, Use = Use};
     dependency.Constraints.AddRange(Constraints.CloneElements());
     dependency.Distributions.AddRange(Distributions);
     dependency.Bindings.AddRange(Bindings.CloneElements());
     return dependency;
 }
Beispiel #2
0
        /// <summary>
        /// Creates a deep copy of this <see cref="Restriction"/> instance.
        /// </summary>
        /// <returns>The new copy of the <see cref="Restriction"/>.</returns>
        public virtual Restriction Clone()
        {
            var restriction = new Restriction {
                InterfaceUri = InterfaceUri, OS = OS, Versions = Versions
            };

            restriction.Constraints.AddRange(Constraints.CloneElements());
            restriction.Distributions.AddRange(Distributions);
            return(restriction);
        }
Beispiel #3
0
        /// <summary>
        /// Creates a deep copy of this <see cref="Runner"/> instance.
        /// </summary>
        /// <returns>The new copy of the <see cref="Runner"/>.</returns>
        public Runner CloneRunner()
        {
            var runner = new Runner {
                InterfaceUri = InterfaceUri, Use = Use, Command = Command, Versions = Versions
            };

            runner.Bindings.AddRange(Bindings.CloneElements());
            runner.Constraints.AddRange(Constraints.CloneElements());
            runner.Arguments.AddRange(Arguments.CloneElements());
            return(runner);
        }