Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 2e97d43

Browse files
committed
Update references assemblies to include private fields for structs
Contributes to https://github.com/dotnet/corefx/issues/6185.
1 parent c84ed43 commit 2e97d43

File tree

47 files changed

+1227
-1180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1227
-1180
lines changed

dir.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@
231231
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
232232
</PropertyGroup>
233233

234+
<PropertyGroup Condition="'$(IsReferenceAssembly)' == 'true'">
235+
<!-- disable warnings about unused fields -->
236+
<NoWarn>$(NoWarn);0169;0649</NoWarn>
237+
</PropertyGroup>
238+
234239
<!-- Set up some common paths -->
235240
<PropertyGroup>
236241
<CommonPath>$(SourceDir)Common\src</CommonPath>

src/System.Collections.Immutable/ref/System.Collections.Immutable.cs

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

src/System.Collections.Specialized/ref/System.Collections.Specialized.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
// Changes to this file must follow the http://aka.ms/api-review process.
66
// ------------------------------------------------------------------------------
77

8-
98
namespace System.Collections.Specialized
109
{
11-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
1210
public partial struct BitVector32
1311
{
12+
private int _dummy;
1413
public BitVector32(System.Collections.Specialized.BitVector32 value) { throw null; }
1514
public BitVector32(int data) { throw null; }
1615
public int Data { get { throw null; } }
@@ -24,9 +23,9 @@ public partial struct BitVector32
2423
public override int GetHashCode() { throw null; }
2524
public override string ToString() { throw null; }
2625
public static string ToString(System.Collections.Specialized.BitVector32 value) { throw null; }
27-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
2826
public readonly partial struct Section
2927
{
28+
private readonly int _dummy;
3029
public short Mask { get { throw null; } }
3130
public short Offset { get { throw null; } }
3231
public bool Equals(System.Collections.Specialized.BitVector32.Section obj) { throw null; }
@@ -87,7 +86,7 @@ public void CopyTo(System.Array array, int index) { }
8786
public void Remove(object key) { }
8887
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
8988
}
90-
public abstract partial class NameObjectCollectionBase : System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback
89+
public abstract partial class NameObjectCollectionBase : System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
9190
{
9291
protected NameObjectCollectionBase() { }
9392
protected NameObjectCollectionBase(System.Collections.IEqualityComparer equalityComparer) { }
@@ -162,7 +161,7 @@ protected void InvalidateCachedArrays() { }
162161
public virtual void Remove(string name) { }
163162
public virtual void Set(string name, string value) { }
164163
}
165-
public partial class OrderedDictionary : System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable, System.Collections.Specialized.IOrderedDictionary, System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback
164+
public partial class OrderedDictionary : System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable, System.Collections.Specialized.IOrderedDictionary, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
166165
{
167166
public OrderedDictionary() { }
168167
public OrderedDictionary(System.Collections.IEqualityComparer comparer) { }
@@ -187,10 +186,10 @@ public void CopyTo(System.Array array, int index) { }
187186
public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
188187
public void Insert(int index, object key, object value) { }
189188
protected virtual void OnDeserialization(object sender) { }
190-
void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) { }
191189
public void Remove(object key) { }
192190
public void RemoveAt(int index) { }
193191
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
192+
void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) { }
194193
}
195194
public partial class StringCollection : System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList
196195
{

src/System.Collections/ref/System.Collections.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ void System.Collections.IDictionary.Add(object key, object value) { }
108108
void System.Collections.IDictionary.Remove(object key) { }
109109
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
110110
public bool TryGetValue(TKey key, out TValue value) { throw null; }
111-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
112111
public partial struct Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IDictionaryEnumerator, System.Collections.IEnumerator, System.IDisposable
113112
{
113+
private object _dummy;
114114
public System.Collections.Generic.KeyValuePair<TKey, TValue> Current { get { throw null; } }
115115
System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry { get { throw null; } }
116116
object System.Collections.IDictionaryEnumerator.Key { get { throw null; } }
@@ -136,9 +136,9 @@ void System.Collections.Generic.ICollection<TKey>.Clear() { }
136136
System.Collections.Generic.IEnumerator<TKey> System.Collections.Generic.IEnumerable<TKey>.GetEnumerator() { throw null; }
137137
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
138138
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
139-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
140139
public partial struct Enumerator : System.Collections.Generic.IEnumerator<TKey>, System.Collections.IEnumerator, System.IDisposable
141140
{
141+
private object _dummy;
142142
public TKey Current { get { throw null; } }
143143
object System.Collections.IEnumerator.Current { get { throw null; } }
144144
public void Dispose() { }
@@ -162,9 +162,9 @@ void System.Collections.Generic.ICollection<TValue>.Clear() { }
162162
System.Collections.Generic.IEnumerator<TValue> System.Collections.Generic.IEnumerable<TValue>.GetEnumerator() { throw null; }
163163
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
164164
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
165-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
166165
public partial struct Enumerator : System.Collections.Generic.IEnumerator<TValue>, System.Collections.IEnumerator, System.IDisposable
167166
{
167+
private object _dummy;
168168
public TValue Current { get { throw null; } }
169169
object System.Collections.IEnumerator.Current { get { throw null; } }
170170
public void Dispose() { }
@@ -221,9 +221,9 @@ void System.Collections.Generic.ICollection<T>.Add(T item) { }
221221
public void TrimExcess() { }
222222
public bool TryGetValue(T equalValue, out T actualValue) { throw null; }
223223
public void UnionWith(System.Collections.Generic.IEnumerable<T> other) { }
224-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
225224
public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
226225
{
226+
private object _dummy;
227227
public T Current { get { throw null; } }
228228
object System.Collections.IEnumerator.Current { get { throw null; } }
229229
public void Dispose() { }
@@ -266,9 +266,9 @@ void System.Collections.Generic.ICollection<T>.Add(T value) { }
266266
System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
267267
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
268268
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
269-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
270269
public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
271270
{
271+
private object _dummy;
272272
public T Current { get { throw null; } }
273273
object System.Collections.IEnumerator.Current { get { throw null; } }
274274
public void Dispose() { }
@@ -354,9 +354,9 @@ void System.Collections.IList.Remove(object item) { }
354354
public T[] ToArray() { throw null; }
355355
public void TrimExcess() { }
356356
public bool TrueForAll(System.Predicate<T> match) { throw null; }
357-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
358357
public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
359358
{
359+
private object _dummy;
360360
public T Current { get { throw null; } }
361361
object System.Collections.IEnumerator.Current { get { throw null; } }
362362
public void Dispose() { }
@@ -386,9 +386,9 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
386386
public void TrimExcess() { }
387387
public bool TryDequeue(out T result) { throw null; }
388388
public bool TryPeek(out T result) { throw null; }
389-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
390389
public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
391390
{
391+
private object _dummy;
392392
public T Current { get { throw null; } }
393393
object System.Collections.IEnumerator.Current { get { throw null; } }
394394
public void Dispose() { }
@@ -437,9 +437,9 @@ void System.Collections.IDictionary.Add(object key, object value) { }
437437
void System.Collections.IDictionary.Remove(object key) { }
438438
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
439439
public bool TryGetValue(TKey key, out TValue value) { throw null; }
440-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
441440
public partial struct Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IDictionaryEnumerator, System.Collections.IEnumerator, System.IDisposable
442441
{
442+
private object _dummy;
443443
public System.Collections.Generic.KeyValuePair<TKey, TValue> Current { get { throw null; } }
444444
System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry { get { throw null; } }
445445
object System.Collections.IDictionaryEnumerator.Key { get { throw null; } }
@@ -465,9 +465,9 @@ void System.Collections.Generic.ICollection<TKey>.Clear() { }
465465
System.Collections.Generic.IEnumerator<TKey> System.Collections.Generic.IEnumerable<TKey>.GetEnumerator() { throw null; }
466466
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
467467
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
468-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
469468
public partial struct Enumerator : System.Collections.Generic.IEnumerator<TKey>, System.Collections.IEnumerator, System.IDisposable
470469
{
470+
private object _dummy;
471471
public TKey Current { get { throw null; } }
472472
object System.Collections.IEnumerator.Current { get { throw null; } }
473473
public void Dispose() { }
@@ -491,9 +491,9 @@ void System.Collections.Generic.ICollection<TValue>.Clear() { }
491491
System.Collections.Generic.IEnumerator<TValue> System.Collections.Generic.IEnumerable<TValue>.GetEnumerator() { throw null; }
492492
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
493493
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
494-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
495494
public partial struct Enumerator : System.Collections.Generic.IEnumerator<TValue>, System.Collections.IEnumerator, System.IDisposable
496495
{
496+
private object _dummy;
497497
public TValue Current { get { throw null; } }
498498
object System.Collections.IEnumerator.Current { get { throw null; } }
499499
public void Dispose() { }
@@ -597,9 +597,9 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
597597
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
598598
public bool TryGetValue(T equalValue, out T actualValue) { throw null; }
599599
public void UnionWith(System.Collections.Generic.IEnumerable<T> other) { }
600-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
601600
public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
602601
{
602+
private object _dummy;
603603
public T Current { get { throw null; } }
604604
object System.Collections.IEnumerator.Current { get { throw null; } }
605605
public void Dispose() { }
@@ -631,9 +631,9 @@ void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) {
631631
public void TrimExcess() { }
632632
public bool TryPeek(out T result) { throw null; }
633633
public bool TryPop(out T result) { throw null; }
634-
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
635634
public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
636635
{
636+
private object _dummy;
637637
public T Current { get { throw null; } }
638638
object System.Collections.IEnumerator.Current { get { throw null; } }
639639
public void Dispose() { }

0 commit comments

Comments
 (0)