private CustomAttributeData(RuntimeModule scope, CustomAttributeRecord caRecord)
{
this.m_scope = scope;
this.m_ctor = (RuntimeConstructorInfo)RuntimeType.GetMethodBase(scope, caRecord.tkCtor);
ParameterInfo[] parametersNoCopy = this.m_ctor.GetParametersNoCopy();
this.m_ctorParams = new CustomAttributeCtorParameter[parametersNoCopy.Length];
for (int i = 0; i < parametersNoCopy.Length; i++)
{
this.m_ctorParams[i] = new CustomAttributeCtorParameter(CustomAttributeData.InitCustomAttributeType((RuntimeType)parametersNoCopy[i].ParameterType));
}
FieldInfo[] fields = this.m_ctor.DeclaringType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
PropertyInfo[] properties = this.m_ctor.DeclaringType.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
this.m_namedParams = new CustomAttributeNamedParameter[properties.Length + fields.Length];
for (int j = 0; j < fields.Length; j++)
{
this.m_namedParams[j] = new CustomAttributeNamedParameter(fields[j].Name, CustomAttributeEncoding.Field, CustomAttributeData.InitCustomAttributeType((RuntimeType)fields[j].FieldType));
}
for (int k = 0; k < properties.Length; k++)
{
this.m_namedParams[k + fields.Length] = new CustomAttributeNamedParameter(properties[k].Name, CustomAttributeEncoding.Property, CustomAttributeData.InitCustomAttributeType((RuntimeType)properties[k].PropertyType));
}
this.m_members = new MemberInfo[fields.Length + properties.Length];
fields.CopyTo(this.m_members, 0);
properties.CopyTo(this.m_members, fields.Length);
CustomAttributeEncodedArgument.ParseAttributeArguments(caRecord.blob, ref this.m_ctorParams, ref this.m_namedParams, this.m_scope);
}