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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ResolveNameEventArgs.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;
  19.     using System.Security.Permissions;
  20.    
  21.     /// <devdoc>
  22.     /// EventArgs for the ResolveNameEventHandler. This event is used
  23.     /// by the serialization process to match a name to an object
  24.     /// instance.
  25.     /// </devdoc>
  26.     [HostProtection(SharedState = true)]
  27.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
  28.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
  29.     public class ResolveNameEventArgs : EventArgs
  30.     {
  31.         private string name;
  32.         private object value;
  33.        
  34.         /// <devdoc>
  35.         /// Creates a new resolve name event args object.
  36.         /// </devdoc>
  37.         public ResolveNameEventArgs(string name)
  38.         {
  39.             this.name = name;
  40.             this.value = null;
  41.         }
  42.        
  43.         /// <devdoc>
  44.         /// The name of the object that needs to be resolved.
  45.         /// </devdoc>
  46.         public string Name {
  47.             get { return name; }
  48.         }
  49.        
  50.         /// <devdoc>
  51.         /// The object that matches the name.
  52.         /// </devdoc>
  53.         public object Value {
  54.             get { return value; }
  55.             set { this.value = value; }
  56.         }
  57.     }
  58. }

Developer Fusion