public static string ConvertFunctionLayerTypeToString(enumFunctionLayerType type) { switch (type) { case enumFunctionLayerType.Item: return("ITEM"); case enumFunctionLayerType.Other: default: return("OTHER"); } }
public FunctionLayer(IFunctionLayer layer, bool keepClass) { _name = layer.Name; _aliasName = layer.AliasName; _visible = layer.Visible; _autoNames = layer.AutoNames; _functionType = layer.FunctionType; _fields = new List <IYTField>(); foreach (IYTField layerField in layer.Fields) { _fields.Add(layerField.Clone(keepClass)); } if (keepClass) { _featureClass = layer.FeatureClass; _esriClassName = layer.EsriClassName; } }
public static string ConvertFunctionLayerTypeToString(enumFunctionLayerType type) { switch (type) { case enumFunctionLayerType.Item: return("ITEM"); case enumFunctionLayerType.RoadCenterLine: return("ROADCENTERLINE"); case enumFunctionLayerType.Jmd: return("JMD"); case enumFunctionLayerType.Other: default: return("OTHER"); } }
public void ReadFromXml(XmlNode xmlNode) { if (xmlNode.Attributes != null) { _name = xmlNode.Attributes["Name"].Value; _aliasName = xmlNode.Attributes["AliasName"] == null ? "" : xmlNode.Attributes["AliasName"].Value; _visible = xmlNode.Attributes["Visible"] == null || xmlNode.Attributes["Visible"].Value.ToUpper().StartsWith("T"); _functionType = xmlNode.Attributes["Type"] == null ? enumFunctionLayerType.Other : EnumHelper.ConvertFunctionLayerTypeFromString(xmlNode.Attributes["Type"].Value); } XmlNodeList nodeList = xmlNode.SelectNodes($"/PipelineConfig/FunctionLayers/FunctionLayer[@Name='{_name}']/Fields/Field"); foreach (XmlNode node in nodeList) { IYTField field = new YTField(node); _fields.Add(field); } }
public bool IsFunctionLayer(string classAliasName, enumFunctionLayerType type) { IFunctionLayer layer = _functionLayers.FirstOrDefault(c => c.AliasName == classAliasName); return(layer != null && layer.FunctionType == type); }
public IFunctionLayer GetFunctionLayer(enumFunctionLayerType type) { return(_functionLayers.FirstOrDefault(c => c.FunctionType == type)); }