-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9012e10
commit 0649b05
Showing
29 changed files
with
181 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using System; | ||
|
||
[Obsolete] | ||
public class ClassWithObsoleteAttribute | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using System; | ||
|
||
[Obsolete] | ||
[DoNotWarnAboutObsoleteUsage] | ||
public class ClassWithObsoleteAttributeToSkip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using System; | ||
|
||
[ObsoleteEx( | ||
TreatAsErrorFromVersion = "2.0", | ||
RemoveInVersion = "4.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using System; | ||
|
||
namespace Before | ||
{ | ||
[ObsoleteEx( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
using System; | ||
#pragma warning disable 67 | ||
|
||
[ObsoleteEx( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
using System.Linq; | ||
using Mono.Cecil; | ||
|
||
public static class AttributeExtensions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
using System.Linq; | ||
using Mono.Cecil; | ||
using Mono.Cecil; | ||
using Mono.Collections.Generic; | ||
|
||
public partial class ModuleWeaver | ||
{ | ||
public void AddEditorBrowsableAttribute(Collection<CustomAttribute> customAttributes, HideObsoleteMembersState state) | ||
public void AddEditorBrowsableAttribute(Collection<CustomAttribute> attributes, HideObsoleteMembersState state) | ||
{ | ||
if (customAttributes.Any(x => x.AttributeType.Name == "EditorBrowsableAttribute") || state == HideObsoleteMembersState.Off) | ||
if (attributes.Any(x => x.AttributeType.Name == "EditorBrowsableAttribute") || state == HideObsoleteMembersState.Off) | ||
{ | ||
return; | ||
} | ||
var customAttribute = new CustomAttribute(EditorBrowsableConstructor); | ||
var customAttributeArgument = new CustomAttributeArgument(EditorBrowsableStateType, state == HideObsoleteMembersState.Advanced ? AdvancedStateConstant : NeverStateConstant); | ||
customAttribute.ConstructorArguments.Add(customAttributeArgument); | ||
customAttributes.Add(customAttribute); | ||
|
||
var attribute = new CustomAttribute(EditorBrowsableConstructor); | ||
var memberState = state == HideObsoleteMembersState.Advanced ? AdvancedStateConstant : NeverStateConstant; | ||
var attributeArgument = new CustomAttributeArgument(EditorBrowsableStateType, memberState); | ||
attribute.ConstructorArguments.Add(attributeArgument); | ||
attributes.Add(attribute); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.