Ejemplo n.º 1
0
 public override PropertyInfo[] __GetDeclaredProperties()
 {
     foreach (int i in module.PropertyMap.Filter(this.MetadataToken))
     {
         int            property   = module.PropertyMap.records[i].PropertyList - 1;
         int            end        = module.PropertyMap.records.Length > i + 1 ? module.PropertyMap.records[i + 1].PropertyList - 1 : module.Property.records.Length;
         PropertyInfo[] properties = new PropertyInfo[end - property];
         if (module.PropertyPtr.RowCount == 0)
         {
             for (int j = 0; property < end; property++, j++)
             {
                 properties[j] = new PropertyInfoImpl(module, this, property);
             }
         }
         else
         {
             for (int j = 0; property < end; property++, j++)
             {
                 properties[j] = new PropertyInfoImpl(module, this, module.PropertyPtr.records[property] - 1);
             }
         }
         return(properties);
     }
     return(Empty <PropertyInfo> .Array);
 }
Ejemplo n.º 2
0
        public override PropertyInfo[] __GetDeclaredProperties()
        {
            int token = this.MetadataToken;

            // TODO use binary search?
            for (int i = 0; i < module.PropertyMap.records.Length; i++)
            {
                if (module.PropertyMap.records[i].Parent == token)
                {
                    int            property   = module.PropertyMap.records[i].PropertyList - 1;
                    int            end        = module.PropertyMap.records.Length > i + 1 ? module.PropertyMap.records[i + 1].PropertyList - 1 : module.Property.records.Length;
                    PropertyInfo[] properties = new PropertyInfo[end - property];
                    if (module.PropertyPtr.RowCount == 0)
                    {
                        for (int j = 0; property < end; property++, j++)
                        {
                            properties[j] = new PropertyInfoImpl(module, this, property);
                        }
                    }
                    else
                    {
                        for (int j = 0; property < end; property++, j++)
                        {
                            properties[j] = new PropertyInfoImpl(module, this, module.PropertyPtr.records[property] - 1);
                        }
                    }
                    return(properties);
                }
            }
            return(Empty <PropertyInfo> .Array);
        }
Ejemplo n.º 3
0
		public override PropertyInfo[] __GetDeclaredProperties()
		{
			int token = this.MetadataToken;
			// TODO use binary search?
			for (int i = 0; i < module.PropertyMap.records.Length; i++)
			{
				if (module.PropertyMap.records[i].Parent == token)
				{
					int property = module.PropertyMap.records[i].PropertyList - 1;
					int end = module.PropertyMap.records.Length > i + 1 ? module.PropertyMap.records[i + 1].PropertyList - 1 : module.Property.records.Length;
					PropertyInfo[] properties = new PropertyInfo[end - property];
					if (module.PropertyPtr.RowCount == 0)
					{
						for (int j = 0; property < end; property++, j++)
						{
							properties[j] = new PropertyInfoImpl(module, this, property);
						}
					}
					else
					{
						for (int j = 0; property < end; property++, j++)
						{
							properties[j] = new PropertyInfoImpl(module, this, module.PropertyPtr.records[property] - 1);
						}
					}
					return properties;
				}
			}
			return Empty<PropertyInfo>.Array;
		}
Ejemplo n.º 4
0
		public override PropertyInfo[] __GetDeclaredProperties()
		{
			foreach (int i in module.PropertyMap.Filter(this.MetadataToken))
			{
				int property = module.PropertyMap.records[i].PropertyList - 1;
				int end = module.PropertyMap.records.Length > i + 1 ? module.PropertyMap.records[i + 1].PropertyList - 1 : module.Property.records.Length;
				PropertyInfo[] properties = new PropertyInfo[end - property];
				if (module.PropertyPtr.RowCount == 0)
				{
					for (int j = 0; property < end; property++, j++)
					{
						properties[j] = new PropertyInfoImpl(module, this, property);
					}
				}
				else
				{
					for (int j = 0; property < end; property++, j++)
					{
						properties[j] = new PropertyInfoImpl(module, this, module.PropertyPtr.records[property] - 1);
					}
				}
				return properties;
			}
			return Empty<PropertyInfo>.Array;
		}
Ejemplo n.º 5
0
        public override bool Equals(object obj)
        {
            PropertyInfoImpl other = obj as PropertyInfoImpl;

            return(other != null && other.DeclaringType == declaringType && other.index == index);
        }