Skip to content

Commit

Permalink
Use string literals for obsoletions in ref files rather than linking …
Browse files Browse the repository at this point in the history
…common class
  • Loading branch information
Josh Schreuder committed Jul 26, 2020
1 parent be913f2 commit 43a8c26
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace System.Reflection.Emit
public sealed partial class AssemblyBuilder : System.Reflection.Assembly
{
internal AssemblyBuilder() { }
[System.ObsoleteAttribute(Obsoletions.CodeBaseMessage, DiagnosticId = Obsoletions.CodeBaseDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[Obsolete("CodeBase and EscapedCodeBase are only included for .NET Framework compatibility. Use Location instead.", DiagnosticId = "SYSLIB0012", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public override string? CodeBase { get { throw null; } }
public override System.Reflection.MethodInfo? EntryPoint { get { throw null; } }
public override string? FullName { get { throw null; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.Emit.cs" />
<Compile Include="..\..\Common\src\System\Obsoletions.cs" Link="Common\System\Obsoletions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/System.Runtime/ref/System.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7564,12 +7564,12 @@ public AmbiguousMatchException(string? message, System.Exception? inner) { }
public abstract partial class Assembly : System.Reflection.ICustomAttributeProvider, System.Runtime.Serialization.ISerializable
{
protected Assembly() { }
[System.ObsoleteAttribute(Obsoletions.CodeBaseMessage, DiagnosticId = Obsoletions.CodeBaseDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[System.ObsoleteAttribute("CodeBase and EscapedCodeBase are only included for .NET Framework compatibility. Use Location instead.", DiagnosticId = "SYSLIB0012", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public virtual string? CodeBase { get { throw null; } }
public virtual System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> CustomAttributes { get { throw null; } }
public virtual System.Collections.Generic.IEnumerable<System.Reflection.TypeInfo> DefinedTypes { [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Types might be removed")] get { throw null; } }
public virtual System.Reflection.MethodInfo? EntryPoint { get { throw null; } }
[System.ObsoleteAttribute(Obsoletions.CodeBaseMessage, DiagnosticId = Obsoletions.CodeBaseDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[System.ObsoleteAttribute("CodeBase and EscapedCodeBase are only included for .NET Framework compatibility. Use Location instead.", DiagnosticId = "SYSLIB0012", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public virtual string EscapedCodeBase { get { throw null; } }
public virtual System.Collections.Generic.IEnumerable<System.Type> ExportedTypes { [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Types might be removed")] get { throw null; } }
public virtual string? FullName { get { throw null; } }
Expand Down
3 changes: 0 additions & 3 deletions src/libraries/System.Runtime/ref/System.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@
<ItemGroup>
<Compile Include="System.Runtime.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\Common\src\System\Obsoletions.cs" Link="Common\System\Obsoletions.cs" />
</ItemGroup>
</Project>

0 comments on commit 43a8c26

Please sign in to comment.