Skip to content

Commit c8dd029

Browse files
authored
Delete code examples for obsolete API members (#11721)
1 parent 0457aba commit c8dd029

File tree

70 files changed

+112
-2733
lines changed

Some content is hidden

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

70 files changed

+112
-2733
lines changed

snippets/cpp/VS_Snippets_CLR/ADClearPrivatePath/CPP/adclearprivatepath.cpp

Lines changed: 0 additions & 35 deletions
This file was deleted.

snippets/cpp/VS_Snippets_CLR/ADSetAppDomainPolicy/CPP/adsetappdomainpolicy.cpp

Lines changed: 0 additions & 46 deletions
This file was deleted.

snippets/cpp/VS_Snippets_CLR/ADShadowCopy/CPP/adshadowcopy.cpp

Lines changed: 0 additions & 66 deletions
This file was deleted.

snippets/cpp/VS_Snippets_CLR/adproperties/CPP/adproperties.cpp

Lines changed: 0 additions & 67 deletions
This file was deleted.

snippets/cpp/VS_Snippets_Remoting/MessageQueue2/cpp/class1.cpp

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ static void CreateQueue(String^ queuePath, bool transactional)
1010
if (!MessageQueue::Exists(queuePath))
1111
{
1212
MessageQueue^ queue = MessageQueue::Create(queuePath, transactional);
13-
queue->Close();
13+
queue->Close();
1414
}
1515
else
1616
{
@@ -127,7 +127,7 @@ void PeekByCorrelationIdStringTimespan()
127127

128128
// Designate a queue to receive the acknowledgement message for this
129129
// message.
130-
msg->AdministrationQueue =
130+
msg->AdministrationQueue =
131131
gcnew MessageQueue(".\\exampleAdminQueue");
132132

133133
// Set the message to generate an acknowledgement message upon its
@@ -144,7 +144,7 @@ void PeekByCorrelationIdStringTimespan()
144144
msg = queue->ReceiveById(id, TimeSpan::FromSeconds(10.0));
145145

146146
// Connect to the admin queue.
147-
MessageQueue^ adminQueue =
147+
MessageQueue^ adminQueue =
148148
gcnew MessageQueue(".\\exampleAdminQueue");
149149

150150
// Set the admin queue's MessageReadPropertyFilter property to ensure
@@ -287,7 +287,7 @@ void ReceiveByCorrelationIdStringTimespan()
287287

288288
// Designate a queue to receive the acknowledgement message for this
289289
// message.
290-
msg->AdministrationQueue =
290+
msg->AdministrationQueue =
291291
gcnew MessageQueue(".\\exampleAdminQueue");
292292

293293
// Set the message to generate an acknowledgement message upon its
@@ -304,7 +304,7 @@ void ReceiveByCorrelationIdStringTimespan()
304304
msg = queue->ReceiveById(id, TimeSpan::FromSeconds(10.0));
305305

306306
// Connect to the admin queue.
307-
MessageQueue^ adminQueue =
307+
MessageQueue^ adminQueue =
308308
gcnew MessageQueue(".\\exampleAdminQueue");
309309

310310
// Set the admin queue's MessageReadPropertyFilter property to ensure
@@ -348,7 +348,7 @@ void ReceiveByCorrelationIdStringTransactionType()
348348
msg = queue->ReceiveById(id, TimeSpan::FromSeconds(10.0));
349349

350350
// Connect to a transactional queue on the local computer.
351-
MessageQueue^ transQueue =
351+
MessageQueue^ transQueue =
352352
gcnew MessageQueue(".\\exampleTransQueue");
353353

354354
// Create a new message in response to the original message.
@@ -404,7 +404,7 @@ void ReceiveByCorrelationIdStringTimespanTransactionType()
404404
msg = queue->ReceiveById(id, TimeSpan::FromSeconds(10.0));
405405

406406
// Connect to a transactional queue on the local computer.
407-
MessageQueue^ transQueue =
407+
MessageQueue^ transQueue =
408408
gcnew MessageQueue(".\\exampleTransQueue");
409409

410410
// Create a new message in response to the original message.
@@ -457,7 +457,7 @@ void ReceiveByCorrelationIdStringTimespanTransaction()
457457
msg = queue->ReceiveById(id, TimeSpan::FromSeconds(10.0));
458458

459459
// Connect to a transactional queue on the local computer.
460-
MessageQueue^ transQueue =
460+
MessageQueue^ transQueue =
461461
gcnew MessageQueue(".\\exampleTransQueue");
462462

463463
// Create a new message in response to the original message.
@@ -510,7 +510,7 @@ void ReceiveByCorrelationIdStringTimespanTransaction()
510510
Console::WriteLine("Message.Label: {0}", responseMsg->Label);
511511
Console::WriteLine("Message.CorrelationId: {0}",
512512
responseMsg->CorrelationId);
513-
513+
514514
// </snippet13>
515515
}
516516

@@ -534,7 +534,7 @@ void ReceiveByCorrelationIdStringTransaction()
534534
msg = queue->ReceiveById(id, TimeSpan::FromSeconds(10.0));
535535

536536
// Connect to a transactional queue on the local computer.
537-
MessageQueue^ transQueue =
537+
MessageQueue^ transQueue =
538538
gcnew MessageQueue(".\\exampleTransQueue");
539539

540540
// Create a new message in response to the original message.
@@ -582,7 +582,7 @@ void ReceiveByCorrelationIdStringTransaction()
582582
// Dispose of the transaction object.
583583
delete transaction;
584584
transQueue->Close();
585-
queue->Close();
585+
queue->Close();
586586
}
587587

588588
// Display the response message's property values.
@@ -822,32 +822,6 @@ void GetAllMessages()
822822
// </snippet21>
823823
}
824824

825-
void GetEnumerator()
826-
{
827-
// <snippet22>
828-
829-
// Connect to a queue on the local computer.
830-
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");
831-
832-
// Get an IEnumerator object.
833-
System::Collections::IEnumerator^ enumerator =
834-
queue->GetMessageEnumerator2();
835-
836-
// Use the IEnumerator object to loop through the messages.
837-
while(enumerator->MoveNext())
838-
{
839-
// Get a message from the enumerator.
840-
Message^ msg = (Message^)enumerator->Current;
841-
842-
// Display the label of the message.
843-
Console::WriteLine(msg->Label);
844-
}
845-
846-
queue->Close();
847-
848-
// </snippet22>
849-
}
850-
851825
void SetPermissionsStringAccessRights()
852826
{
853827
// <snippet23>
@@ -1098,4 +1072,4 @@ void main()
10981072
// Write the exception information to the console.
10991073
Console::WriteLine(ex->Message);
11001074
}
1101-
}
1075+
}

snippets/csharp/System.Diagnostics/EventLog/CreateEventSource/Project.csproj

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)