/// <summary> /// Deep copies the current GreyFoxSetting to another instance of GreyFoxSetting. /// </summary> /// <param name="GreyFoxSetting">The GreyFoxSetting to copy to.</param> /// <param name="isolation">Placeholders are used to isolate the GreyFoxSetting from its children.</param> public void CopyTo(GreyFoxSetting greyFoxSetting, bool isolation) { greyFoxSetting.iD = iD; greyFoxSetting.isPlaceHolder = isPlaceHolder; greyFoxSetting.isSynced = isSynced; greyFoxSetting.name = name; greyFoxSetting.settingValue = settingValue; if (parent != null) { if (isolation) { greyFoxSetting.parent = parent.NewPlaceHolder(); } else { greyFoxSetting.parent = parent.Copy(false); } } if (modifyRole != null) { if (isolation) { greyFoxSetting.modifyRole = modifyRole.NewPlaceHolder(); } else { greyFoxSetting.modifyRole = modifyRole.Copy(false); } } greyFoxSetting.isSystemSetting = isSystemSetting; }
/// <summary> /// Fills the {0} from a OleIDataReader. /// </summary> public static void FillFromReader(GreyFoxSetting greyFoxSetting, IDataReader r, int idOffset, int dataOffset) { greyFoxSetting.iD = r.GetInt32(idOffset); greyFoxSetting.isSynced = true; greyFoxSetting.isPlaceHolder = false; greyFoxSetting.name = r.GetString(0 + dataOffset); greyFoxSetting.settingValue = r.GetString(1 + dataOffset); if (!r.IsDBNull(2 + dataOffset) && r.GetInt32(2 + dataOffset) > 0) { greyFoxSetting.parent = GreyFoxSetting.NewPlaceHolder(r.GetInt32(2 + dataOffset)); } if (!r.IsDBNull(3 + dataOffset) && r.GetInt32(3 + dataOffset) > 0) { greyFoxSetting.modifyRole = GreyFoxRole.NewPlaceHolder(r.GetInt32(3 + dataOffset)); } greyFoxSetting.isSystemSetting = r.GetBoolean(4 + dataOffset); }