Пример #1
0
        private static async Task <bool> SaveAsync(IDictionary <Feature, Geometry> result)
        {
            // create an edit operation
            var editOperation = new EditOperation();

            EditorTransaction transaction = new EditorTransaction(editOperation);

            return(await transaction.ExecuteAsync(
                       editContext => Store(editContext, result),
                       "Erase polygon from feature(s)", GetDatasets(result.Keys)));
        }
Пример #2
0
        public static async Task <bool> SaveInOperationAsync(
            [NotNull] string description,
            [CanBeNull] IDictionary <Feature, Geometry> updates,
            [CanBeNull] IDictionary <Feature, IList <Geometry> > copies = null)
        {
            var editOperation = new EditOperation();

            EditorTransaction transaction = new EditorTransaction(editOperation);

            return(await transaction.ExecuteAsync(
                       editContext => StoreTx(editContext, updates, copies),
                       description, GetDatasets(updates?.Keys, copies?.Keys)));
        }