Exemplo n.º 1
0
        public IModuleDataSet Clone()
        {
            ModuleDataSet newDataSet = Activator.CreateInstance(GetType()) as ModuleDataSet;

            _Clone(this, newDataSet);
            return(newDataSet);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Do not use.  Use ProfileDefinition.NewDefinition instead.
 /// </summary>
 public ProfileDefinition()
 {
     ModuleDataSet = new ModuleDataSet();
 }
Exemplo n.º 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);
            }
        }