We need you! We're working hard on the next version of Developer Fusion - Let us know what you think we should be up to!

The Labs \ Source Viewer \ SSCLI \ System.Resources \ IResourceWriter

  1. // ==++==
  2. //
  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. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Class:  IResourceWriter
  18. **
  19. **
  20. ** Purpose: Default way to write strings to a COM+ resource
  21. ** file.
  22. **
  23. **
  24. ===========================================================*/
  25. namespace System.Resources
  26. {
  27.     using System;
  28.     using System.IO;
  29.     [System.Runtime.InteropServices.ComVisible(true)]
  30.     public interface IResourceWriter : IDisposable
  31.     {
  32.         // Interface does not need to be marked with the serializable attribute
  33.         // Adds a string resource to the list of resources to be written to a file.
  34.         // They aren't written until WriteFile() is called.
  35.         //
  36.         void AddResource(string name, string value);
  37.        
  38.         // Adds a resource to the list of resources to be written to a file.
  39.         // They aren't written until WriteFile() is called.
  40.         //
  41.         void AddResource(string name, object value);
  42.        
  43.         // Adds a named byte array as a resource to the list of resources to
  44.         // be written to a file. They aren't written until WriteFile() is called.
  45.         //
  46.         void AddResource(string name, byte[] value);
  47.        
  48.         // Closes the underlying resource file.
  49.         void Close();
  50.        
  51.         // After calling AddResource, this writes all resources to the output
  52.         // stream. This does NOT close the output stream.
  53.         void Generate();
  54.     }
  55. }

Developer Fusion