public SoapAttributes(ICustomAttributeProvider provider) {
object[] attrs = provider.GetCustomAttributes(false);
for (int i = 0; i < attrs.Length; i++) {
if (attrs[i] is SoapIgnoreAttribute || attrs[i] is ObsoleteAttribute) {
this.soapIgnore = true;
break;
}
else if (attrs[i] is SoapElementAttribute) {
this.soapElement = (SoapElementAttribute)attrs[i];
}
else if (attrs[i] is SoapAttributeAttribute) {
this.soapAttribute = (SoapAttributeAttribute)attrs[i];
}
else if (attrs[i] is SoapTypeAttribute) {
this.soapType = (SoapTypeAttribute)attrs[i];
}
else if (attrs[i] is SoapEnumAttribute) {
this.soapEnum = (SoapEnumAttribute)attrs[i];
}
else if (attrs[i] is DefaultValueAttribute) {
this.soapDefaultValue = ((DefaultValueAttribute)attrs[i]).Value;
}
}
if (soapIgnore) {
this.soapElement = null;
this.soapAttribute = null;
this.soapType = null;
this.soapEnum = null;
this.soapDefaultValue = null;
}
}