ArcGISPortalViewer.Helpers.IdentifyHelper.GetFieldInfo C# (CSharp) Метод

GetFieldInfo() приватный статический Метод

private static GetFieldInfo ( Layer l, IdentifyItem item ) : Task>
l Layer
item IdentifyItem
Результат Task>
        private static async Task<IReadOnlyList<FieldInfo>> GetFieldInfo(Layer l, IdentifyItem item)
        {
            if (l == null || item == null || item.LayerID == -1)
                return null;

            if (l is ArcGISDynamicMapServiceLayer)
            {
                var dynamicLayer = (ArcGISDynamicMapServiceLayer)l;
                var layerinfo = await dynamicLayer.GetDetailsAsync(item.LayerID);
                return layerinfo != null ? layerinfo.Fields : null;
            }
            if (l is ArcGISTiledMapServiceLayer)
            {
                var tiledLayer = (ArcGISTiledMapServiceLayer)l;
                var layerinfo = await tiledLayer.GetDetailsAsync(item.LayerID);
                return layerinfo != null ? layerinfo.Fields : null;
            }
            return null;
        }
    }