コード例 #1
0
        /// <summary>
        /// Clones the object.
        /// </summary>
        /// <returns>A clone of the object.</returns>
        public override SpiceObject Clone()
        {
            var clone = new Component(Name, (ParameterCollection)PinsAndParameters.Clone(), LineInfo);

            clone.NameParameter = (Parameter)NameParameter.Clone();
            return(clone);
        }
コード例 #2
0
        public FirewallRule(NameParameter name, DirectionParameter direction, ActionParameter action)
        {
            if (name == null) throw new ArgumentNullException(nameof(name));
            if (direction == null) throw new ArgumentNullException(nameof(direction));
            if (action == null) throw new ArgumentNullException(nameof(action));

            Name = name;
            Direction = direction;
            Action = action;
        }