Skip to content

Commit ea64b25

Browse files
authored
remove inline C++ snippets (#11344)
1 parent 7b30062 commit ea64b25

24 files changed

+1692
-2276
lines changed

xml/System.Collections.Generic/Dictionary`2+KeyCollection.xml

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

xml/System.Collections.Generic/Dictionary`2+ValueCollection.xml

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

xml/System.Collections.Generic/Dictionary`2.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@
24892489
24902490
Enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.
24912491
2492-
The <xref:System.Collections.ICollection.SyncRoot%2A> property returns an object that can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock the object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property for C#, C++, and Visual Basic.
2492+
The <xref:System.Collections.ICollection.SyncRoot%2A> property returns an object that can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock the object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property.
24932493
24942494
```csharp
24952495
ICollection ic = ...;
@@ -2505,18 +2505,7 @@ SyncLock ic.SyncRoot
25052505
End SyncLock
25062506
```
25072507
2508-
```cpp
2509-
ICollection^ ic = ...;
2510-
try {
2511-
Monitor::Enter(ic->SyncRoot);
2512-
// Access the collection.
2513-
}
2514-
finally {
2515-
Monitor::Exit(ic->SyncRoot);
2516-
}
2517-
```
2518-
2519-
Getting the value of this property is an O(1) operation.
2508+
Getting the value of this property is an O(1) operation.
25202509
25212510
]]></format>
25222511
</remarks>

xml/System.Collections.Generic/LinkedList`1.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@
23312331
23322332
Enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.
23332333
2334-
<xref:System.Collections.ICollection.SyncRoot%2A> returns an object that can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock this object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property for C#, C++, and Visual Basic.
2334+
<xref:System.Collections.ICollection.SyncRoot%2A> returns an object that can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock this object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property.
23352335
23362336
```csharp
23372337
ICollection ic = ...;
@@ -2347,18 +2347,7 @@ SyncLock ic.SyncRoot
23472347
End SyncLock
23482348
```
23492349
2350-
```cpp
2351-
ICollection^ ic = ...;
2352-
try {
2353-
Monitor::Enter(ic->SyncRoot);
2354-
// Access the collection.
2355-
}
2356-
finally {
2357-
Monitor::Exit(ic->SyncRoot);
2358-
}
2359-
```
2360-
2361-
Retrieving the value of this property is an O(1) operation.
2350+
Retrieving the value of this property is an O(1) operation.
23622351
23632352
]]></format>
23642353
</remarks>

xml/System.Collections.Generic/List`1.xml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4539,7 +4539,7 @@ Public Function StartsWith(e As Employee) As Boolean
45394539
45404540
Enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.
45414541
4542-
<xref:System.Collections.ICollection.SyncRoot%2A> returns an object that can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock this object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property for C#, C++, and Visual Basic.
4542+
<xref:System.Collections.ICollection.SyncRoot%2A> returns an object that can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock this object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property.
45434543
45444544
```csharp
45454545
ICollection ic = ...;
@@ -4556,20 +4556,7 @@ SyncLock ic.SyncRoot
45564556
End SyncLock
45574557
```
45584558
4559-
```cpp
4560-
ICollection^ ic = ...;
4561-
try
4562-
{
4563-
Monitor::Enter(ic->SyncRoot);
4564-
// Access the collection.
4565-
}
4566-
finally
4567-
{
4568-
Monitor::Exit(ic->SyncRoot);
4569-
}
4570-
```
4571-
4572-
Retrieving the value of this property is an O(1) operation.
4559+
Retrieving the value of this property is an O(1) operation.
45734560
45744561
]]></format>
45754562
</remarks>

xml/System.Collections.Generic/Queue`1.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@
12521252
12531253
Enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.
12541254
1255-
<xref:System.Collections.ICollection.SyncRoot%2A> returns an object, which can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock this object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property for C#, C++, and Visual Basic.
1255+
<xref:System.Collections.ICollection.SyncRoot%2A> returns an object, which can be used to synchronize access to the <xref:System.Collections.ICollection>. Synchronization is effective only if all threads lock this object before accessing the collection. The following code shows the use of the <xref:System.Collections.ICollection.SyncRoot%2A> property.
12561256
12571257
```csharp
12581258
ICollection ic = ...;
@@ -1268,18 +1268,7 @@ SyncLock ic.SyncRoot
12681268
End SyncLock
12691269
```
12701270
1271-
```cpp
1272-
ICollection^ ic = ...;
1273-
try {
1274-
Monitor::Enter(ic->SyncRoot);
1275-
// Access the collection.
1276-
}
1277-
finally {
1278-
Monitor::Exit(ic->SyncRoot);
1279-
}
1280-
```
1281-
1282-
Retrieving the value of this property is an O(1) operation.
1271+
Retrieving the value of this property is an O(1) operation.
12831272
12841273
]]></format>
12851274
</remarks>

0 commit comments

Comments
 (0)