MapSuiteGisEditor/GisEditorInfrastructure/Managers/SelectionManager.cs
/// <summary>
/// Gets the selected features layer core.
/// </summary>
/// <param name="feature">The feature.</param>
/// <returns></returns>
Gets the selected features layer core.
Gets the selected features layer core .
protected virtual FeatureLayer GetSelectedFeaturesLayerCore(Feature feature)
        {
            var segments = feature.Id.Split(new string[] { SelectionTrackInteractiveOverlay.FeatureIdSeparator }, StringSplitOptions.RemoveEmptyEntries);
            if (segments.Length == 2)
            {
                string hashCode = segments[1];
                return GisEditor.ActiveMap.Overlays.OfType<LayerOverlay>()
                    .SelectMany(o => o.Layers)
                    .OfType<FeatureLayer>()
                    .FirstOrDefault(l => l.GetHashCode().ToString(CultureInfo.InvariantCulture).Equals(hashCode));
            }
            else return null;
        }
protected virtual FeatureLayer GetSelectedFeaturesLayerCore ( Feature feature ) { var segments = feature . Id . Split ( new string [ ] { SelectionTrackInteractiveOverlay . FeatureIdSeparator } , StringSplitOptions . RemoveEmptyEntries ) ; if ( segments . Length == 2 ) { string hashCode = segments [ 1 ] ; return GisEditor . ActiveMap . Overlays . OfType < LayerOverlay > ( ) . SelectMany ( o => o . Layers ) . OfType < FeatureLayer > ( ) . FirstOrDefault ( l => l . GetHashCode ( ) . ToString ( CultureInfo . InvariantCulture ) . Equals ( hashCode ) ) ; } else return null ; }
Gets the selected features layer core.
Gets the selected features layer core .
None
feature
Feature
None