Microsoft.Web.Administration.Application.RemoveAsync C# (CSharp) Méthode

RemoveAsync() private méthode

private RemoveAsync ( ) : Task
Résultat Task
        internal async Task<ApplicationCollection> RemoveAsync()
        {
            if (Path == RootPath)
            {
                throw new InvalidOperationException("Root application cannot be removed. Please remove the site.");
            }

            var newApps = new ApplicationCollection(Site);
            foreach (Application item in Parent)
            {
                if (item == this)
                {
                    item.Delete();
                    continue;
                }

                item.Parent = newApps;
                newApps.Add(item);
            }

            newApps.Parent.Applications = newApps;
            return newApps;
        }

Usage Example

Exemple #1
0
 internal async Task RemoveApplicationAsync(Application application)
 {
     Applications = await application.RemoveAsync();
 }
All Usage Examples Of Microsoft.Web.Administration.Application::RemoveAsync