Skip to content

Commit

Permalink
Make all assemblies CLS Compliant (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra authored Jan 24, 2020
1 parent b98a08e commit 45f89e9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

[assembly: System.CLSCompliant(true)]
namespace Microsoft.Data
{
/// <include file='..\..\..\..\doc\snippets\Microsoft.Data\OperationAbortedException.xml' path='docs/members[@name="OperationAbortedException"]/OperationAbortedException/*' />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

[assembly: System.CLSCompliant(true)]
namespace Microsoft.Data
{
/// <include file='..\..\..\..\doc\snippets\Microsoft.Data\OperationAbortedException.xml' path='docs/members[@name="OperationAbortedException"]/OperationAbortedException/*' />
[System.Serializable]
public sealed partial class OperationAbortedException : System.SystemException
{
internal OperationAbortedException() { }

private OperationAbortedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }

}
}
namespace Microsoft.Data.Sql
Expand All @@ -27,6 +31,7 @@ public SqlNotificationRequest(string userData, string options, int timeout) { }
public string UserData { get { throw null; } set { } }
}
}

namespace Microsoft.Data.SqlClient
{
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/ApplicationIntent.xml' path='docs/members[@name="ApplicationIntent"]/ApplicationIntent/*'/>
Expand Down Expand Up @@ -1315,9 +1320,12 @@ public void CopyTo(Microsoft.Data.SqlClient.SqlError[] array, int index) { }
public System.Collections.IEnumerator GetEnumerator() { throw null; }
}
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/SqlException/*'/>
[System.Serializable]
public sealed partial class SqlException : System.Data.Common.DbException
{
internal SqlException() { }
private SqlException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }

/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/Class/*'/>
public byte Class { get { throw null; } }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/ClientConnectionId/*'/>
Expand Down Expand Up @@ -1708,10 +1716,14 @@ public interface IBinarySerialize
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/Write/*'/>
void Write(System.IO.BinaryWriter w);
}

/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/InvalidUdtException/*'/>
[System.Serializable]
public sealed partial class InvalidUdtException : System.SystemException
{
internal InvalidUdtException() { }
private InvalidUdtException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }

}
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlDataRecord.xml' path='docs/members[@name="SqlDataRecord"]/SqlDataRecord/*'/>
public partial class SqlDataRecord : System.Data.IDataRecord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
<AssemblyInfo Include="using System.Runtime.InteropServices%3B" />
<AssemblyInfo Include="using System.Runtime.Versioning%3B%0A" />

<AssemblyInfo Include="[assembly: System.CLSCompliantAttribute(true)]" />
<AssemblyInfo Include="[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]" />
<AssemblyInfo Include="[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(&quot;.NETFramework,Version=$(TargetFrameworkVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Resources.SatelliteContractVersion(&quot;$(AssemblyVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyTitleAttribute(&quot;$(AssemblyName)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyDescriptionAttribute(&quot;$(Description)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyCompanyAttribute(&quot;$(Company)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyProductAttribute(&quot;$(Product)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyCopyrightAttribute(&quot;$(Copyright)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyVersionAttribute(&quot;$(AssemblyVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyFileVersionAttribute(&quot;$(AssemblyFileVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyInformationalVersionAttribute(&quot;$(Version)&quot;)]" />
<AssemblyInfo Include="[assembly: System.Reflection.AssemblyConfigurationAttribute(&quot;$(Configuration)&quot;)]" />
<AssemblyInfo Include="[assembly: CLSCompliant(true)]" />
<AssemblyInfo Include="[assembly: ComVisible(false)]" />
<AssemblyInfo Include="[assembly: TargetFramework(&quot;.NETFramework,Version=$(TargetFrameworkVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: SatelliteContractVersion(&quot;$(AssemblyVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyTitle(&quot;$(AssemblyName)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyDescription(&quot;$(Description)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyCompany(&quot;$(Company)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyProduct(&quot;$(Product)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyCopyright(&quot;$(Copyright)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyVersion(&quot;$(AssemblyVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyFileVersion(&quot;$(AssemblyFileVersion)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyInformationalVersion(&quot;$(Version)&quot;)]" />
<AssemblyInfo Include="[assembly: AssemblyConfiguration(&quot;$(Configuration)&quot;)]" />
</ItemGroup>
<MakeDir Directories="$(IntermediateOutputPath)" />
<WriteLinesToFile File="$(IntermediateOutputPath)$(AssemblyName).AssemblyInfo.cs" Overwrite="True" Lines="@(AssemblyInfo)" />
Expand Down
1 change: 1 addition & 0 deletions tools/targets/GenerateThisAssemblyCs.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
BeforeTargets="CoreCompile">
<PropertyGroup>
<ThisAssemblyCsContents>
[assembly: System.CLSCompliant(true)]
namespace System
{
internal static class ThisAssembly
Expand Down

0 comments on commit 45f89e9

Please sign in to comment.