internal EventBuilder(ModuleBuilder mod, string name, EventAttributes attr, TypeBuilder type, EventToken evToken)
 {
     this.m_name = name;
     this.m_module = mod;
     this.m_attributes = attr;
     this.m_evToken = evToken;
     this.m_type = type;
 }
Exemple #2
0
 internal EventBuilder(ModuleBuilder mod, string name, EventAttributes attr, TypeBuilder type, EventToken evToken)
 {
     this.m_name       = name;
     this.m_module     = mod;
     this.m_attributes = attr;
     this.m_evToken    = evToken;
     this.m_type       = type;
 }
        /// <summary>Checks if the given object is an instance of EventToken and is equal to this instance.</summary>
        /// <returns>Returns true if <paramref name="obj" /> is an instance of EventToken and equals the current instance; otherwise, false.</returns>
        /// <param name="obj">The object to be compared with this instance. </param>
        public override bool Equals(object obj)
        {
            bool flag = obj is EventToken;

            if (flag)
            {
                EventToken eventToken = (EventToken)obj;
                flag = (this.tokValue == eventToken.tokValue);
            }
            return(flag);
        }
Exemple #4
0
        /// <summary>
        /// </summary>
        public override bool Equals(object obj)
        {
            bool res = obj is EventToken;

            if (res)
            {
                EventToken that = (EventToken)obj;
                res = (this.tokValue == that.tokValue);
            }

            return(res);
        }
Exemple #5
0
 // Constructs a EventBuilder.
 //
 internal EventBuilder(
     ModuleBuilder mod,              // the module containing this EventBuilder
     String name,                    // Event name
     EventAttributes attr,           // event attribute such as Public, Private, and Protected defined above
                                     //int            eventType,                // event type
     TypeBuilder type,               // containing type
     EventToken evToken)
 {
     m_name       = name;
     m_module     = mod;
     m_attributes = attr;
     m_evToken    = evToken;
     m_type       = type;
 }
     // Constructs a EventBuilder.  
 	//
     internal EventBuilder(
 		Module			mod,					// the module containing this EventBuilder		
 		String			name,					// Event name
 		EventAttributes attr,					// event attribute such as Public, Private, and Protected defined above
 		int				eventType,				// event type
 		TypeBuilder     type,                   // containing type
         EventToken		evToken)
     {   		
         m_name = name;
         m_module = mod;
         m_attributes = attr;
 		m_evToken = evToken;
         m_type = type;
     }
Exemple #7
0
 public bool Equals(EventToken obj)
 {
     return(obj.m_event == m_event);
 }
Exemple #8
0
        [System.Security.SecurityCritical]  // auto-generated
        private EventBuilder DefineEventNoLock(String name, EventAttributes attributes, Type eventtype)
        {
            if (name == null)
                throw new ArgumentNullException("name");
            if (name.Length == 0)
                throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "name");
            if (name[0] == '\0')
                throw new ArgumentException(Environment.GetResourceString("Argument_IllegalName"), "name");
            Contract.EndContractBlock();

            int tkType;
            EventToken      evToken;
            
            CheckContext(eventtype);

            ThrowIfCreated();

            tkType = m_module.GetTypeTokenInternal( eventtype ).Token;

            // Internal helpers to define property records
            evToken = new EventToken(DefineEvent(
                m_module.GetNativeHandle(),
                m_tdType.Token,
                name,
                attributes,
                tkType));

            // create the property builder now.
            return new EventBuilder(
                    m_module,
                    name,
                    attributes,
                    //tkType,
                    this,
                    evToken);
        }
Exemple #9
0
		public bool Equals (EventToken obj)
		{
			return (this.tokValue == obj.tokValue);
		}
 static EventToken()
 {
     Empty = new EventToken();
 }
Exemple #11
0
 public bool Equals(EventToken obj)
 {
     return obj.m_event == m_event;
 }
		static EventToken ()
		{
			Empty = new EventToken ();
		}
Exemple #13
0
 public bool Equals(EventToken obj)
 {
     return(this.tokValue == obj.tokValue);
 }
Exemple #14
0
 /// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.EventToken" />.</summary><returns>true if the value of <paramref name="obj" /> is equal to the value of the current instance; otherwise, false.</returns><param name="obj">The <see cref="T:System.Reflection.Emit.EventToken" /> to compare to the current instance.</param>
 public bool Equals(EventToken obj)
 {
     throw new NotImplementedException();
 }
 public bool Equals(EventToken obj)
 {
   return default(bool);
 }
 public bool Equals(EventToken obj)
 {
     return(default(bool));
 }