using System;
using System.Globalization;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// Defines the properties for a type.
// Token: 0x02000213 RID: 531
[ComDefaultInterface(typeof(_PropertyBuilder))]
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
public sealed class PropertyBuilder : PropertyInfo, _PropertyBuilder
{
// Token: 0x06001BED RID: 7149 RVA: 0x00069DFC File Offset: 0x00067FFC
internal PropertyBuilder(TypeBuilder tb, string name, PropertyAttributes attributes, Type returnType, Type[] returnModReq, Type[] returnModOpt, Type[] parameterTypes, Type[][] paramModReq, Type[][] paramModOpt)
{
this.name = name;
this.attrs = attributes;
this.type = returnType;
this.returnModReq = returnModReq;
this.returnModOpt = returnModOpt;
this.paramModReq = paramModReq;
this.paramModOpt = paramModOpt;
if (parameterTypes != null)
{
this.parameters = new Type[parameterTypes.Length];
Array.Copy(parameterTypes, this.parameters, this.parameters.Length);
}
this.typeb = tb;
this.table_idx = tb.get_next_table_index(this, 23, true);
}
/// Maps a set of names to a corresponding set of dispatch identifiers.
/// Reserved for future use. Must be IID_NULL.
/// Passed-in array of names to be mapped.
/// Count of the names to be mapped.
/// The locale context in which to interpret the names.
/// Caller-allocated array which receives the IDs corresponding to the names.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001BEE RID: 7150 RVA: 0x00069E88 File Offset: 0x00068088
void _PropertyBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
{
throw new NotImplementedException();
}
/// Retrieves the type information for an object, which can then be used to get the type information for an interface.
/// The type information to return.
/// The locale identifier for the type information.
/// Receives a pointer to the requested type information object.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001BEF RID: 7151 RVA: 0x00069E90 File Offset: 0x00068090
void _PropertyBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo)
{
throw new NotImplementedException();
}
/// Retrieves the number of type information interfaces that an object provides (either 0 or 1).
/// Points to a location that receives the number of type information interfaces provided by the object.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001BF0 RID: 7152 RVA: 0x00069E98 File Offset: 0x00068098
void _PropertyBuilder.GetTypeInfoCount(out uint pcTInfo)
{
throw new NotImplementedException();
}
/// Provides access to properties and methods exposed by an object.
/// Identifies the member.
/// Reserved for future use. Must be IID_NULL.
/// The locale context in which to interpret arguments.
/// Flags describing the context of the call.
/// Pointer to a structure containing an array of arguments, an array of argument DISPIDs for named arguments, and counts for the number of elements in the arrays.
/// Pointer to the location where the result is to be stored.
/// Pointer to a structure that contains exception information.
/// The index of the first argument that has an error.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001BF1 RID: 7153 RVA: 0x00069EA0 File Offset: 0x000680A0
void _PropertyBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
{
throw new NotImplementedException();
}
/// Gets the attributes for this property.
/// Attributes of this property.
// Token: 0x17000502 RID: 1282
// (get) Token: 0x06001BF2 RID: 7154 RVA: 0x00069EA8 File Offset: 0x000680A8
public override PropertyAttributes Attributes
{
get
{
return this.attrs;
}
}
/// Gets a value indicating whether the property can be read.
/// true if this property can be read; otherwise, false.
// Token: 0x17000503 RID: 1283
// (get) Token: 0x06001BF3 RID: 7155 RVA: 0x00069EB0 File Offset: 0x000680B0
public override bool CanRead
{
get
{
return this.get_method != null;
}
}
/// Gets a value indicating whether the property can be written to.
/// true if this property can be written to; otherwise, false.
// Token: 0x17000504 RID: 1284
// (get) Token: 0x06001BF4 RID: 7156 RVA: 0x00069EC0 File Offset: 0x000680C0
public override bool CanWrite
{
get
{
return this.set_method != null;
}
}
/// Gets the class that declares this member.
/// The Type object for the class that declares this member.
// Token: 0x17000505 RID: 1285
// (get) Token: 0x06001BF5 RID: 7157 RVA: 0x00069ED0 File Offset: 0x000680D0
public override Type DeclaringType
{
get
{
return this.typeb;
}
}
/// Gets the name of this member.
/// A containing the name of this member.
// Token: 0x17000506 RID: 1286
// (get) Token: 0x06001BF6 RID: 7158 RVA: 0x00069ED8 File Offset: 0x000680D8
public override string Name
{
get
{
return this.name;
}
}
/// Retrieves the token for this property.
/// Read-only. Retrieves the token for this property.
// Token: 0x17000507 RID: 1287
// (get) Token: 0x06001BF7 RID: 7159 RVA: 0x00069EE0 File Offset: 0x000680E0
public PropertyToken PropertyToken
{
get
{
return default(PropertyToken);
}
}
/// Gets the type of the field of this property.
/// The type of this property.
// Token: 0x17000508 RID: 1288
// (get) Token: 0x06001BF8 RID: 7160 RVA: 0x00069EF8 File Offset: 0x000680F8
public override Type PropertyType
{
get
{
return this.type;
}
}
/// Gets the class object that was used to obtain this instance of MemberInfo.
/// The Type object through which this MemberInfo object was obtained.
// Token: 0x17000509 RID: 1289
// (get) Token: 0x06001BF9 RID: 7161 RVA: 0x00069F00 File Offset: 0x00068100
public override Type ReflectedType
{
get
{
return this.typeb;
}
}
/// Adds one of the other methods associated with this property.
/// A MethodBuilder object that represents the other method.
///
/// is null.
///
/// has been called on the enclosing type.
// Token: 0x06001BFA RID: 7162 RVA: 0x00069F08 File Offset: 0x00068108
public void AddOtherMethod(MethodBuilder mdBuilder)
{
}
/// Returns an array of the public and non-public get and set accessors on this property.
/// An array of type MethodInfo containing the matching public or non-public accessors, or an empty array if matching accessors do not exist on this property.
/// Indicates whether non-public methods should be returned in the MethodInfo array. true if non-public methods are to be included; otherwise, false.
/// This method is not supported.
// Token: 0x06001BFB RID: 7163 RVA: 0x00069F0C File Offset: 0x0006810C
public override MethodInfo[] GetAccessors(bool nonPublic)
{
return null;
}
/// Returns an array of all the custom attributes for this property.
/// An array of all the custom attributes.
/// If true, walks up this property's inheritance chain to find the custom attributes
/// This method is not supported.
// Token: 0x06001BFC RID: 7164 RVA: 0x00069F10 File Offset: 0x00068110
public override object[] GetCustomAttributes(bool inherit)
{
throw this.not_supported();
}
/// Returns an array of custom attributes identified by .
/// An array of custom attributes defined on this reflected member, or null if no attributes are defined on this member.
/// An array of custom attributes identified by type.
/// If true, walks up this property's inheritance chain to find the custom attributes.
/// This method is not supported.
// Token: 0x06001BFD RID: 7165 RVA: 0x00069F18 File Offset: 0x00068118
public override object[] GetCustomAttributes(Type attributeType, bool inherit)
{
throw this.not_supported();
}
/// Returns the public and non-public get accessor for this property.
/// A MethodInfo object representing the get accessor for this property, if is true. Returns null if is false and the get accessor is non-public, or if is true but no get accessors exist.
/// Indicates whether non-public get accessors should be returned. true if non-public methods are to be included; otherwise, false.
// Token: 0x06001BFE RID: 7166 RVA: 0x00069F20 File Offset: 0x00068120
public override MethodInfo GetGetMethod(bool nonPublic)
{
return this.get_method;
}
/// Returns an array of all the index parameters for the property.
/// An array of type ParameterInfo containing the parameters for the indexes.
/// This method is not supported.
// Token: 0x06001BFF RID: 7167 RVA: 0x00069F28 File Offset: 0x00068128
public override ParameterInfo[] GetIndexParameters()
{
throw this.not_supported();
}
/// Returns the set accessor for this property.
/// Value Condition A object representing the Set method for this property. The set accessor is public. is true and non-public methods can be returned. null is true, but the property is read-only. is false and the set accessor is non-public.
/// Indicates whether the accessor should be returned if it is non-public. true if non-public methods are to be included; otherwise, false.
// Token: 0x06001C00 RID: 7168 RVA: 0x00069F30 File Offset: 0x00068130
public override MethodInfo GetSetMethod(bool nonPublic)
{
return this.set_method;
}
/// Gets the value of the indexed property by calling the property's getter method.
/// The value of the specified indexed property.
/// The object whose property value will be returned.
/// Optional index values for indexed properties. This value should be null for non-indexed properties.
/// This method is not supported.
// Token: 0x06001C01 RID: 7169 RVA: 0x00069F38 File Offset: 0x00068138
public override object GetValue(object obj, object[] index)
{
return null;
}
/// Gets the value of a property having the specified binding, index, and CultureInfo.
/// The property value for .
/// The object whose property value will be returned.
/// The invocation attribute. This must be a bit flag from BindingFlags : InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, or SetProperty. A suitable invocation attribute must be specified. If a static member is to be invoked, the Static flag of BindingFlags must be set.
/// An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects using reflection. If is null, the default binder is used.
/// Optional index values for indexed properties. This value should be null for non-indexed properties.
/// The CultureInfo object that represents the culture for which the resource is to be localized. Note that if the resource is not localized for this culture, the CultureInfo.Parent method will be called successively in search of a match. If this value is null, the CultureInfo is obtained from the CultureInfo.CurrentUICulture property.
/// This method is not supported.
// Token: 0x06001C02 RID: 7170 RVA: 0x00069F3C File Offset: 0x0006813C
public override object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
{
throw this.not_supported();
}
/// Indicates whether one or more instance of is defined on this property.
/// true if one or more instance of is defined on this property; otherwise false.
/// The Type object to which the custom attributes are applied.
/// Specifies whether to walk up this property's inheritance chain to find the custom attributes.
/// This method is not supported.
// Token: 0x06001C03 RID: 7171 RVA: 0x00069F44 File Offset: 0x00068144
public override bool IsDefined(Type attributeType, bool inherit)
{
throw this.not_supported();
}
/// Sets the default value of this property.
/// The default value of this property.
///
/// has been called on the enclosing type.
/// The property is not one of the supported types.-or-The type of does not match the type of the property.-or-The property is of type or other reference type, and is not null.
// Token: 0x06001C04 RID: 7172 RVA: 0x00069F4C File Offset: 0x0006814C
public void SetConstant(object defaultValue)
{
this.def_value = defaultValue;
}
/// Set a custom attribute using a custom attribute builder.
/// An instance of a helper class to define the custom attribute.
///
/// is null.
/// if has been called on the enclosing type.
// Token: 0x06001C05 RID: 7173 RVA: 0x00069F58 File Offset: 0x00068158
public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
{
string fullName = customBuilder.Ctor.ReflectedType.FullName;
if (fullName == "System.Runtime.CompilerServices.SpecialNameAttribute")
{
this.attrs |= PropertyAttributes.SpecialName;
return;
}
if (this.cattrs != null)
{
CustomAttributeBuilder[] array = new CustomAttributeBuilder[this.cattrs.Length + 1];
this.cattrs.CopyTo(array, 0);
array[this.cattrs.Length] = customBuilder;
this.cattrs = array;
}
else
{
this.cattrs = new CustomAttributeBuilder[1];
this.cattrs[0] = customBuilder;
}
}
/// Set a custom attribute using a specified custom attribute blob.
/// The constructor for the custom attribute.
/// A byte blob representing the attributes.
///
/// or is null.
///
/// has been called on the enclosing type.
// Token: 0x06001C06 RID: 7174 RVA: 0x00069FF0 File Offset: 0x000681F0
[ComVisible(true)]
public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
{
this.SetCustomAttribute(new CustomAttributeBuilder(con, binaryAttribute));
}
/// Sets the method that gets the property value.
/// A MethodBuilder object that represents the method that gets the property value.
///
/// is null.
///
/// has been called on the enclosing type.
// Token: 0x06001C07 RID: 7175 RVA: 0x0006A000 File Offset: 0x00068200
public void SetGetMethod(MethodBuilder mdBuilder)
{
this.get_method = mdBuilder;
}
/// Sets the method that sets the property value.
/// A MethodBuilder object that represents the method that sets the property value.
///
/// is null.
///
/// has been called on the enclosing type.
// Token: 0x06001C08 RID: 7176 RVA: 0x0006A00C File Offset: 0x0006820C
public void SetSetMethod(MethodBuilder mdBuilder)
{
this.set_method = mdBuilder;
}
/// Sets the value of the property with optional index values for index properties.
/// The object whose property value will be set.
/// The new value for this property.
/// Optional index values for indexed properties. This value should be null for non-indexed properties.
/// This method is not supported.
// Token: 0x06001C09 RID: 7177 RVA: 0x0006A018 File Offset: 0x00068218
public override void SetValue(object obj, object value, object[] index)
{
}
/// Sets the property value for the given object to the given value.
/// The object whose property value will be returned.
/// The new value for this property.
/// The invocation attribute. This must be a bit flag from BindingFlags : InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, or SetProperty. A suitable invocation attribute must be specified. If a static member is to be invoked, the Static flag of BindingFlags must be set.
/// An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects using reflection. If is null, the default binder is used.
/// Optional index values for indexed properties. This value should be null for non-indexed properties.
/// The CultureInfo object that represents the culture for which the resource is to be localized. Note that if the resource is not localized for this culture, the CultureInfo.Parent method will be called successively in search of a match. If this value is null, the CultureInfo is obtained from the CultureInfo.CurrentUICulture property.
/// This method is not supported.
// Token: 0x06001C0A RID: 7178 RVA: 0x0006A01C File Offset: 0x0006821C
public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
{
}
/// Gets the module in which the type that declares the current property is being defined.
/// The in which the type that declares the current property is defined.
// Token: 0x1700050A RID: 1290
// (get) Token: 0x06001C0B RID: 7179 RVA: 0x0006A020 File Offset: 0x00068220
public override Module Module
{
get
{
return base.Module;
}
}
// Token: 0x06001C0C RID: 7180 RVA: 0x0006A028 File Offset: 0x00068228
private Exception not_supported()
{
return new NotSupportedException("The invoked member is not supported in a dynamic module.");
}
// Token: 0x0400096C RID: 2412
private PropertyAttributes attrs;
// Token: 0x0400096D RID: 2413
private string name;
// Token: 0x0400096E RID: 2414
private Type type;
// Token: 0x0400096F RID: 2415
private Type[] parameters;
// Token: 0x04000970 RID: 2416
private CustomAttributeBuilder[] cattrs;
// Token: 0x04000971 RID: 2417
private object def_value;
// Token: 0x04000972 RID: 2418
private MethodBuilder set_method;
// Token: 0x04000973 RID: 2419
private MethodBuilder get_method;
// Token: 0x04000974 RID: 2420
private int table_idx;
// Token: 0x04000975 RID: 2421
internal TypeBuilder typeb;
// Token: 0x04000976 RID: 2422
private Type[] returnModReq;
// Token: 0x04000977 RID: 2423
private Type[] returnModOpt;
// Token: 0x04000978 RID: 2424
private Type[][] paramModReq;
// Token: 0x04000979 RID: 2425
private Type[][] paramModOpt;
}
}