public bool Equals(ConfigurationItem otherConfigurationItem) { if (otherConfigurationItem is null) { return(false); } if (ReferenceEquals(this, otherConfigurationItem)) { return(true); } return(Id.Equals(otherConfigurationItem.Id) && ConfigurationType.Equals(otherConfigurationItem.ConfigurationType) && Name.Equals(otherConfigurationItem.Name) && Price.Equals(otherConfigurationItem.Price)); }
/// <summary> /// 返回虚拟路径的绝对路径 /// </summary> /// <param name="virtualPath"></param> /// <returns></returns> private string GetPath(ConfigurationType configurationType, string virtualPath) { return(configurationType.Equals(ConfigurationType.Web) ? HttpContext.Current.Server.MapPath(virtualPath) : AppDomain.CurrentDomain.BaseDirectory + virtualPath); }