Esempio n. 1
0
        public string CreateLines(bool isCasing)
        {
            _sb = new StringBuilder();

            string layerType = LayerUtils.GetLayerType(LayerWithSource);

            AppendLine($"{LayerUtils.NormaliseName(LayerWithSource.Id)}:");
            _indent++;

            CreateFilterLines(isCasing);

            Layer casingLayer = null;

            if (refLayers != null && refLayers.Count > 0)
            {
                if (LayerUtils.IsCasing(LayerWithSource.Id))
                {
                    casingLayer = LayerWithSource;
                }
                else if (refLayers != null)
                {
                    foreach (Layer refLayer in refLayers)
                    {
                        if (LayerUtils.IsCasing(refLayer.Id))
                        {
                            casingLayer = refLayer;
                        }
                    }

                    if (casingLayer != null)
                    {
                        refLayers.Remove(casingLayer);
                        refLayers.Add(LayerWithSource);
                    }
                }
            }

            CreateDrawLines(layerType, isCasing);

            _indent--;

            return(_sb.ToString());
        }