Merge pull request #6313 from Mailaender/CS0067-workaround

Fixed bogus warning as error CS0067 The event is never used
This commit is contained in:
Paul Chote
2014-08-23 20:08:01 +12:00
2 changed files with 6 additions and 0 deletions

View File

@@ -18,7 +18,10 @@ namespace OpenRA.Primitives
public class ObservableCollection<T> : Collection<T>, IObservableCollection public class ObservableCollection<T> : Collection<T>, IObservableCollection
{ {
public event Action<object> OnAdd = k => { }; public event Action<object> OnAdd = k => { };
// TODO Workaround for https://github.com/OpenRA/OpenRA/issues/6101
#pragma warning disable 67
public event Action<object> OnRemove = k => { }; public event Action<object> OnRemove = k => { };
#pragma warning restore
public event Action<int> OnRemoveAt = i => { }; public event Action<int> OnRemoveAt = i => { };
public event Action<object, object> OnSet = (o, n) => { }; public event Action<object, object> OnSet = (o, n) => { };
public event Action OnRefresh = () => { }; public event Action OnRefresh = () => { };

View File

@@ -34,8 +34,11 @@ namespace OpenRA.Primitives
public event Action<object> OnAdd = k => { }; public event Action<object> OnAdd = k => { };
public event Action<object> OnRemove = k => { }; public event Action<object> OnRemove = k => { };
// TODO Workaround for https://github.com/OpenRA/OpenRA/issues/6101
#pragma warning disable 67
public event Action<int> OnRemoveAt = i => { }; public event Action<int> OnRemoveAt = i => { };
public event Action<object, object> OnSet = (o, n) => { }; public event Action<object, object> OnSet = (o, n) => { };
#pragma warning restore
public event Action OnRefresh = () => { }; public event Action OnRefresh = () => { };
protected void FireOnRefresh() protected void FireOnRefresh()