Exemplo n.º 1
0
        /// <summary>
        /// Generate the actual property (not the property accessors)
        /// </summary>
        public void GenerateProperties()
        {
            foreach (KeyValuePair <int, ConvProperty> pair in m_properties)
            {
                ConvProperty property = pair.Value;
                property.GenerateProperty(m_info, m_info.TypeBuilder);
            }

            // Clear all properties so that we can re-use the same interface info again
            m_properties.Clear();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Remember the InterfaceMemberInfo/MethodBuilder information for creating properties later
        /// </summary>
        public void SetPropertyInfo(InterfaceMemberInfo memberInfo, MethodBuilder method)
        {
            int          dispId   = memberInfo.MemId;
            ConvProperty property = null;

            if (!m_properties.TryGetValue(dispId, out property))
            {
                property = new ConvProperty(memberInfo.PropertyInfo);
                m_properties.Add(dispId, property);
            }
            if (memberInfo.IsPropertyGet)
            {
                property.SetGetMethod(method);
            }
            if (memberInfo.IsPropertyPut)
            {
                property.SetPutMethod(method);
            }
            if (memberInfo.IsPropertyPutRef)
            {
                property.SetPutRefMethod(method);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Remember the InterfaceMemberInfo/MethodBuilder information for creating properties later
 /// </summary>
 public void SetPropertyInfo(InterfaceMemberInfo memberInfo, MethodBuilder method)
 {
     int dispId = memberInfo.MemId;
     ConvProperty property = null;
     if (!m_properties.TryGetValue(dispId, out property))
     {
         property = new ConvProperty(memberInfo.PropertyInfo);
         m_properties.Add(dispId, property);
     }
     if (memberInfo.IsPropertyGet)
     {
         property.SetGetMethod(method);
     }
     if (memberInfo.IsPropertyPut)
     {
         property.SetPutMethod(method);
     }
     if (memberInfo.IsPropertyPutRef)
     {
         property.SetPutRefMethod(method);
     }
 }