public bool Filter(ExportProperty property) { if (_excludes.Count == 0) { return(false); } return(_excludes.Any(g => g.Equals(property.FieldName, StringComparison.CurrentCultureIgnoreCase))); }
/// <summary> /// Fills the abaqus. /// </summary> /// <returns></returns> public static string FillAbaqus(IList <ExportPropertyGeneral> properties, string name) { //StringBuilder sb = new s string exportString = REVISION + System.Environment.NewLine; exportString = exportString + UNITSYSTEM + System.Environment.NewLine; exportString = exportString + STRESS + System.Environment.NewLine; exportString = exportString + PRESSURE + System.Environment.NewLine; exportString = exportString + ELASTIC_MODULUS + System.Environment.NewLine; exportString = exportString + TEMP + System.Environment.NewLine; exportString = exportString + Density + System.Environment.NewLine; exportString = exportString + Force + System.Environment.NewLine; exportString = exportString + Distance + System.Environment.NewLine; exportString = exportString + SpecificHeat + System.Environment.NewLine; exportString = exportString + Conductivity + System.Environment.NewLine; exportString = exportString + Convection + System.Environment.NewLine; exportString = exportString + Coefficient + System.Environment.NewLine; exportString = exportString + ENDCOMMNET + System.Environment.NewLine; exportString = exportString + TWOCOMMENTS + System.Environment.NewLine; exportString = exportString + MATERIALNAME + name.Replace(" ", "_") + System.Environment.NewLine; exportString = exportString + ELASTIC + System.Environment.NewLine; exportString = exportString + YOUNGPOISSON + System.Environment.NewLine; exportString = exportString + FormatValue(properties, PropertyTypeEnum.PhysicalModulusOfElasticity) + ", " + FormatValue(properties, PropertyTypeEnum.PhysicalPoissonCoefficient) + System.Environment.NewLine; exportString = exportString + CONDUCTIVITY + System.Environment.NewLine; exportString = exportString + THERMALCONDUCTIVITY + System.Environment.NewLine; exportString = exportString + FormatThermalConductivity(properties); exportString = exportString + EXPANSION + System.Environment.NewLine; exportString = exportString + THERMALEXPANSION + System.Environment.NewLine; exportString = exportString + FormatThermalExpansion(properties); exportString = exportString + SPECIFIC + System.Environment.NewLine; exportString = exportString + SPECIFICHEAT + System.Environment.NewLine; exportString = exportString + FormatSpecificThermalCapacity(properties); ExportProperty property = (from u in properties where u.Type == PropertyTypeEnum.PlasticStrainStress select u).FirstOrDefault() as ExportProperty; if (property != null) { exportString = exportString + PLASTIC + System.Environment.NewLine; exportString = exportString + STRESSPLASTICSTRAIN + System.Environment.NewLine; exportString = exportString + FormatValue(properties, PropertyTypeEnum.PlasticStrainStress); } exportString = exportString + DENSITY + System.Environment.NewLine; exportString = exportString + FormatValue(properties, PropertyTypeEnum.PhysicalDensity) + System.Environment.NewLine; return(exportString); }
public bool Filter(ExportProperty property) { if (_dynamicHeaders != null && _dynamicHeaders.Count > 0) { foreach (var header in _dynamicHeaders) { if (string.Equals(header.Key, property.FieldName, StringComparison.CurrentCultureIgnoreCase)) { SetDynamicHader(property, header.Value); } } } return(false); }
protected override IEnumerable <ExportProperty> GetExportProperties(object data) { var properties = base.GetExportProperties(data); var orderedProperties = new List <ExportProperty>(); ExportProperty matchProperty = null; var index = 0; foreach (var propertyName in _propertyNames) { matchProperty = properties.FirstOrDefault(g => string.Equals(g.FieldName, propertyName, StringComparison.CurrentCultureIgnoreCase)); if (matchProperty != null) { matchProperty.Order = index; orderedProperties.Add(matchProperty); index++; } } return(orderedProperties); }
set => SetValue(ExportProperty, value);
public void SetDynamicHader(ExportProperty property, string dynamicHeader) { property.Header = dynamicHeader; }