我打開[assembly:System.CLSCompliant(true)]內我的C#解決方案的程序集。如何在Web引用中處理符合CLS的內容?
我現在正在爲SharePoint Web Service生成的代碼中收到一些警告。
這裏是一個不符合CLS-的方法之一:
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/GetItem", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public uint GetItem(string Url, out FieldInformation[] Fields, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] out byte[] Stream) {
object[] results = this.Invoke("GetItem", new object[] {
Url});
Fields = ((FieldInformation[])(results[1]));
Stream = ((byte[])(results[2]));
return ((uint)(results[0]));
}
如何刪除這個警告?
謝謝 基思