コード例 #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);
 }
コード例 #2
0
ファイル: TypeDefImpl.cs プロジェクト: aduros/ikvm-monotouch
        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);
        }
コード例 #3
0
ファイル: TypeDefImpl.cs プロジェクト: ngraziano/mono
		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;
		}
コード例 #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;
		}
コード例 #5
0
ファイル: PropertyInfoImpl.cs プロジェクト: labsnap/ikvm-1
        public override bool Equals(object obj)
        {
            PropertyInfoImpl other = obj as PropertyInfoImpl;

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