Пример #1
0
        public IModuleDataSet Clone()
        {
            ModuleDataSet newDataSet = Activator.CreateInstance(GetType()) as ModuleDataSet;

            _Clone(this, newDataSet);
            return(newDataSet);
        }
Пример #2
0
        private void _Clone(ModuleDataSet source, ModuleDataSet destination)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (destination == null)
            {
                throw new ArgumentNullException("destination");
            }

            // Clone exactly, assuming unchanged type and instance ids for the
            // modules the data belongs to.
            foreach (IModuleDataModel dataModel in source._dataModels.Values)
            {
                destination._Add(dataModel, dataModel.ModuleTypeId, dataModel.ModuleInstanceId);
            }
        }
Пример #3
0
 /// <summary>
 /// Do not use.  Use ProfileDefinition.NewDefinition instead.
 /// </summary>
 public ProfileDefinition()
 {
     ModuleDataSet = new ModuleDataSet();
 }
Пример #4
0
        private void _Clone(ModuleDataSet source, ModuleDataSet destination)
        {
            if (source == null) throw new ArgumentNullException("source");
            if (destination == null) throw new ArgumentNullException("destination");

            // Clone exactly, assuming unchanged type and instance ids for the
            // modules the data belongs to.
            foreach (IModuleDataModel dataModel in source._dataModels.Values) {
                destination._Add(dataModel, dataModel.ModuleTypeId, dataModel.ModuleInstanceId);
            }
        }