public IModuleDataSet Clone() { ModuleDataSet newDataSet = Activator.CreateInstance(GetType()) as ModuleDataSet; _Clone(this, newDataSet); return(newDataSet); }
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); } }
/// <summary> /// Do not use. Use ProfileDefinition.NewDefinition instead. /// </summary> public ProfileDefinition() { ModuleDataSet = new ModuleDataSet(); }
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); } }