protected bool NeedsToBeCheckedForCLSCompliance(){
bool result = false;
this.clsCompliance = CLSComplianceSpec.NotAttributed;
if (this.customAttributes != null){
CustomAttribute clsAttr = this.customAttributes.GetAttribute(Typeob.CLSCompliantAttribute);
if (clsAttr != null){
this.clsCompliance = clsAttr.GetCLSComplianceValue();
result = this.clsCompliance == CLSComplianceSpec.CLSCompliant;
this.customAttributes.Remove(clsAttr);
}
}
if (this.clsCompliance == CLSComplianceSpec.CLSCompliant && !this.Engine.isCLSCompliant)
this.context.HandleError(JSError.TypeAssemblyCLSCompliantMismatch);
if (this.clsCompliance == CLSComplianceSpec.NotAttributed && (this.attributes & TypeAttributes.Public) != 0)
result = Engine.isCLSCompliant;
return result;
}