/// <summary>
        /// Ensures any extra property on the given <paramref name="obj"/> is loaded.
        /// </summary>
        /// <param name="obj">The object that needs the extra properties.</param>
        public void LoadExtraProperties(object obj)
        {
            try
            {
                Database database = obj as Database;
                if (database != null)
                {
                    this.LoadExtraProperties(database);
                    return;
                }

                ServiceObjective serviceObjective = obj as ServiceObjective;
                if (serviceObjective != null)
                {
                    this.LoadExtraProperties(serviceObjective);
                    return;
                }

                RestorableDroppedDatabase restorableDroppedDatabase = obj as RestorableDroppedDatabase;
                if (restorableDroppedDatabase != null)
                {
                    this.LoadExtraProperties(restorableDroppedDatabase);
                    return;
                }
            }
            catch
            {
                // Ignore exceptions when loading extra properties, for backward compatibility.
            }
        }
 /// <summary>
 /// Ensures any extra property on the given <paramref name="database"/> is loaded.
 /// </summary>
 /// <param name="database">The database that needs the extra properties.</param>
 private void LoadExtraProperties(RestorableDroppedDatabase database)
 {
     // Fill in the context property
     database.Context = this;
 }
 /// <summary>
 /// Ensures any extra property on the given <paramref name="database"/> is loaded.
 /// </summary>
 /// <param name="database">The database that needs the extra properties.</param>
 private void LoadExtraProperties(RestorableDroppedDatabase database)
 {
     // Fill in the context property
     database.Context = this;
 }