Exemple #1
0
        public override ProjectTemplate Clone()
        {
            ProjectTemplate template = new ProjectTemplate(this);

            if (_sourceFile != null)
            {
                template._sourceFile = String.Copy(_sourceFile);
            }
            if (_version != null)
            {
                template._version = (Version)_version.Clone();
            }
            if (_authoring != null)
            {
                template._authoring = _authoring.Clone();
            }
            if (_configuration != null)
            {
                template._configuration = _configuration.Clone();
            }
            if (_description != null)
            {
                template._description = _description.Clone();
            }
            if (_properties != null)
            {
                template._properties = _properties.Clone();
            }
            if (_assistant != null)
            {
                template._assistant = _assistant.Clone();
            }
            if (_actions != null)
            {
                template._actions = _actions.Clone();
            }
            if (_itemGroups != null)
            {
                template._itemGroups = _itemGroups.Clone();
            }
            if (_propertyGroups != null)
            {
                template._propertyGroups = _propertyGroups.Clone();
            }
            if (_targetFrameworks != null)
            {
                template._targetFrameworks = _targetFrameworks.Clone();
            }
            if (_files != null)
            {
                template._files = _files.Clone();
            }

            return(template);
        }
        public override FileTemplate Clone()
        {
            FileTemplate template = new FileTemplate(this);

            if (_sourceFile != null)
            {
                template._sourceFile = String.Copy(_sourceFile);
            }
            if (_version != null)
            {
                template._version = (Version)_version.Clone();
            }
            if (_authoring != null)
            {
                template._authoring = _authoring.Clone();
            }
            if (_configuration != null)
            {
                template._configuration = _configuration.Clone();
            }
            if (_description != null)
            {
                template._description = _description.Clone();
            }
            if (_properties != null)
            {
                template._properties = _properties.Clone();
            }
            if (_assistant != null)
            {
                template._assistant = _assistant.Clone();
            }
            if (_files != null)
            {
                template._files = _files.Clone();
            }

            return(template);
        }