/// <summary> /// 构建安装文件配置 /// </summary> /// <param name="rebuild">是否重建元素</param> public InstallArguments(bool rebuild) { if (rebuild) { ProductConfigList.Clear(); PropertyList.Clear(); } }
/// <summary> /// 构建安装文件配置 /// </summary> /// <param name="rebuild">是否重建元素</param> public InstallArguments(bool rebuild) { if (rebuild) { ProductConfigList.Clear(); PropertyList.Clear(); OfficeMgmtCOM = null; ForceUpgrade = false; AllowCdnFallback = false; DisplayLevel = false; AcceptEULA = false; LoggingLevel = null; UpdateEnabled = null; RemoveMSI = false; LoggingPath = "%temp%"; } }
public void CopyTo(PvPBattleRules target) { lock (_CopyStore) { if (_CopyStore == null) { _CopyStore = new PropertyList <PvPBattleRules> { Filter = p => p.Name != "InvokeReset" && p.Name != "InvokeClear" && p.PropertyType == typeof(bool) }; } _CopyStore.Deserialize(this); _CopyStore.Serialize(target); _CopyStore.Clear(); } }
public void ClearItems() { var data = new PropertyList(); data.Add("A", 1); data.Add("B", 2); data.Add("C", 3); data.Add("D", 4); data.Add("E", 5); data.Add("F", 6); Assert.AreEqual(6, data.Count); data.Clear(); Assert.AreEqual(0, data.Count); Assert.IsFalse(data.Contains("A")); Assert.IsFalse(data.Contains("B")); Assert.IsFalse(data.Contains("C")); Assert.IsFalse(data.Contains("D")); Assert.IsFalse(data.Contains("E")); Assert.IsFalse(data.Contains("F")); }
///-------------------------------------------------------------------------------- /// <summary>This method disposes of resources in the model.</summary> ///-------------------------------------------------------------------------------- protected override void OnDispose() { if (ReverseInstance != null) { ReverseInstance.Dispose(); ReverseInstance = null; } if (ForwardInstance != null) { ForwardInstance.Dispose(); ForwardInstance = null; } Solution = null; if (_propertyList != null) { foreach (Property item in PropertyList) { item.Dispose(); } PropertyList.Clear(); PropertyList = null; } if (_auditPropertyList != null) { foreach (AuditProperty item in AuditPropertyList) { item.Dispose(); } AuditPropertyList.Clear(); AuditPropertyList = null; } #region protected #endregion protected base.OnDispose(); }