The Labs \ Source Viewer \ SSCLI \ System.Reflection \ ManifestResourceInfo

  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: ManifestResourceInfo
  18. **
  19. **
  20. ** Purpose: For info regarding a manifest resource's topology.
  21. **
  22. **
  23. =============================================================================*/
  24. namespace System.Reflection
  25. {
  26.     using System;
  27.    
  28.     [System.Runtime.InteropServices.ComVisible(true)]
  29.     public class ManifestResourceInfo
  30.     {
  31.         private Assembly _containingAssembly;
  32.         private string _containingFileName;
  33.         private ResourceLocation _resourceLocation;
  34.        
  35.         internal ManifestResourceInfo(Assembly containingAssembly, string containingFileName, ResourceLocation resourceLocation)
  36.         {
  37.             _containingAssembly = containingAssembly;
  38.             _containingFileName = containingFileName;
  39.             _resourceLocation = resourceLocation;
  40.         }
  41.        
  42.         public virtual Assembly ReferencedAssembly {
  43.             get { return _containingAssembly; }
  44.         }
  45.        
  46.         public virtual string FileName {
  47.             get { return _containingFileName; }
  48.         }
  49.        
  50.         public virtual ResourceLocation ResourceLocation {
  51.             get { return _resourceLocation; }
  52.         }
  53.     }
  54.    
  55.     // The ResourceLocation is a combination of these flags, set or not.
  56.     // Linked means not Embedded.
  57.     [Flags(), Serializable()]
  58.     [System.Runtime.InteropServices.ComVisible(true)]
  59.     public enum ResourceLocation
  60.     {
  61.         Embedded = 1,
  62.         ContainedInAnotherAssembly = 2,
  63.         ContainedInManifestFile = 4
  64.     }
  65. }

Developer Fusion