The Labs \ Source Viewer \ SSCLI \ System.ComponentModel.Design.Serialization \ IDesignerLoaderService

  1. //------------------------------------------------------------------------------
  2. // <copyright file="IDesignerLoaderService.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.ComponentModel.Design.Serialization
  16. {
  17.    
  18.     using System.Collections;
  19.    
  20.     /// <devdoc>
  21.     /// This interface may be optionally implemented by the designer loader to provide
  22.     /// load services to outside components. It provides support for asynchronous loading
  23.     /// of the designer and allows other objects to initiate a reload of othe
  24.     /// design surface. Designer loaders do not need to implement this but it is
  25.     /// recommended. We do not directly put this on DesignerLoader so we can prevent
  26.     /// outside objects from interacting with the main methods of a designer loader.
  27.     /// These should only be called by the designer host.
  28.     /// </devdoc>
  29.     public interface IDesignerLoaderService
  30.     {
  31.        
  32.         /// <devdoc>
  33.         /// Adds a load dependency to this loader. This indicates that some other
  34.         /// object is also participating in the load, and that the designer loader
  35.         /// should not call EndLoad on the loader host until all load dependencies
  36.         /// have called DependentLoadComplete on the designer loader.
  37.         /// </devdoc>
  38.         void AddLoadDependency();
  39.        
  40.         /// <devdoc>
  41.         /// This is called by any object that has previously called
  42.         /// AddLoadDependency to signal that the dependent load has completed.
  43.         /// The caller should pass either an empty collection or null to indicate
  44.         /// a successful load, or a collection of exceptions that indicate the
  45.         /// reason(s) for failure.
  46.         /// </devdoc>
  47.         void DependentLoadComplete(bool successful, ICollection errorCollection);
  48.        
  49.         /// <devdoc>
  50.         /// This can be called by an outside object to request that the loader
  51.         /// reload the design document. If it supports reloading and wants to
  52.         /// comply with the reload, the designer loader should return true. Otherwise
  53.         /// it should return false, indicating that the reload will not occur.
  54.         /// Callers should not rely on the reload happening immediately; the
  55.         /// designer loader may schedule this for some other time, or it may
  56.         /// try to reload at once.
  57.         /// </devdoc>
  58.         bool Reload();
  59.     }
  60. }

Developer Fusion