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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="IDesignerSerializationService.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.     using System.Collections;
  18.     using System.ComponentModel;
  19.    
  20.     /// <devdoc>
  21.     /// This service provides a way to exchange a collection of objects
  22.     /// for a serializable object that represents them. The returned
  23.     /// object contains live references to objects in the collection.
  24.     /// This returned object can then be passed to any runtime
  25.     /// serialization mechanism. The object itself serializes
  26.     /// components the same way designers write source for them; by picking
  27.     /// them apart property by property. Many objects do not support
  28.     /// runtime serialization because their internal state cannot be
  29.     /// adequately duplicated. All components that support a designer,
  30.     /// however, must support serialization by walking their public
  31.     /// properties, methods and events. This interface uses this
  32.     /// technique to convert a collection of components into a single
  33.     /// opaque object that does support runtime serialization.
  34.     /// </devdoc>
  35.     public interface IDesignerSerializationService
  36.     {
  37.        
  38.         /// <devdoc>
  39.         /// <para>
  40.         /// Deserializes the provided serialization data object and
  41.         /// returns a collection of objects contained within that
  42.         /// data.
  43.         /// </para>
  44.         /// </devdoc>
  45.         ICollection Deserialize(object serializationData);
  46.        
  47.         /// <devdoc>
  48.         /// <para>
  49.         /// Serializes the given collection of objects and
  50.         /// stores them in an opaque serialization data object.
  51.         /// The returning object fully supports runtime serialization.
  52.         /// </para>
  53.         /// </devdoc>
  54.         object Serialize(ICollection objects);
  55.     }
  56. }

Developer Fusion