private async Task <FeatureLayer> CreateFeatureLayerAsync(string uri, string name, string displayName)
        {
            FeatureLayer layer = null;

            var gdbFeatureServiceTable = new GeodatabaseFeatureServiceTable()
            {
                ServiceUri = uri,
                OutFields  = OutFields.All
            };

            // Not in Try - Catch so exception is thrown and catched on higher level
            await gdbFeatureServiceTable.InitializeAsync();

            if (gdbFeatureServiceTable.IsInitialized)
            {
                layer = new FeatureLayer()
                {
                    ID           = name,
                    DisplayName  = displayName,
                    FeatureTable = gdbFeatureServiceTable
                };
            }

            return(layer);
        }
        /// <summary>
        /// Helper method to create individual FeatureLayers
        /// </summary>
        private async Task <FeatureLayer> CreateFeatureLayerAsync(string uri, string name, string displayName)
        {
            FeatureLayer layer = null;

            // Creates and initializes the layer
            var gdbFeatureServiceTable = await GeodatabaseFeatureServiceTable.OpenAsync(new Uri(uri));

            if (gdbFeatureServiceTable.IsInitialized)
            {
                layer = new FeatureLayer()
                {
                    ID           = name,
                    DisplayName  = displayName,
                    FeatureTable = gdbFeatureServiceTable
                };
            }

            return(layer);
        }
        private async Task<FeatureLayer> CreateFeatureLayerAsync(string uri, string name, string displayName)
        {
            FeatureLayer layer = null;

            var gdbFeatureServiceTable = new GeodatabaseFeatureServiceTable()
            {
                ServiceUri = uri,
                OutFields = OutFields.All
            };

            // Not in Try - Catch so exception is thrown and catched on higher level
            await gdbFeatureServiceTable.InitializeAsync();

            if (gdbFeatureServiceTable.IsInitialized)
            {
                layer = new FeatureLayer()
                {
                    ID = name,
                    DisplayName = displayName,
                    FeatureTable = gdbFeatureServiceTable
                };
            }

            return layer;
        }