Skip to content

Commit 9236d21

Browse files
Merge pull request SharePoint#7121 from andrewconnell/msdocsrules_misc
Update fenced code formatting to match MSDOCS supported types
2 parents a13a278 + 95bc33b commit 9236d21

File tree

93 files changed

+2952
-2934
lines changed

Some content is hidden

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

93 files changed

+2952
-2934
lines changed

docs/apis/alm-api-for-spfx-add-ins.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ALM APIs can be used to perform exactly the same operations that are available f
2828
ALM APIs are supported for the tenant-scoped site collections and [site collection app catalog](../general-development/site-collection-app-catalog.md). Use the corresponding app catalog's URL to target a specific app catalog. You must first enabled a site collection app catalog before targeting it with the actions documented on this page.
2929

3030
> [!IMPORTANT]
31-
> Tenant-scoped permissions which require [tenant administrative approval](https://docs.microsoft.com/sharepoint/dev/solution-guidance/how-to-provide-add-in-app-only-tenant-administrative-permissions-in-sharepoint-online) are not supported with the ALM APIs.
31+
> Tenant-scoped permissions which require [tenant administrative permissions](../solution-guidance/how-to-provide-add-in-app-only-tenant-administrative-permissions-in-sharepoint-online.md) are not supported with the ALM APIs.
3232
3333
## Options for working with ALM APIs
3434

@@ -42,12 +42,12 @@ The app catalog must be included in all HTTP requests when using the REST API as
4242

4343
For example:
4444

45-
| Scope | Endpoint |
46-
| :-------------- | :--------------------------------------------------------------------------------------------- |
47-
| tenant | **https://contoso.sharepoint.com/sites/AppCatalog/_api/web/tenantappcatalog/{command}** |
48-
| site collection | **https://contoso.sharepoint.com/sites/Marketing/_api/web/sitecollectionappcatalog/{command}** |
45+
| Scope | Endpoint |
46+
| :-------------- | :------------------------------------------------------------------------------------------- |
47+
| tenant | `https://contoso.sharepoint.com/sites/AppCatalog/_api/web/tenantappcatalog/{command}` |
48+
| site collection | `https://contoso.sharepoint.com/sites/Marketing/_api/web/sitecollectionappcatalog/{command}` |
4949

50-
- when targeting the tenant app catalog located at **https://contoso.sharepoint.com/sites/AppCatalog**, the endpoint would be **
50+
- when targeting the tenant app catalog located at `https://contoso.sharepoint.com/sites/AppCatalog`, the endpoint would be **
5151

5252
Learn more here: [SharePoint REST API](../sp-add-ins/get-to-know-the-sharepoint-rest-service.md)
5353

@@ -57,7 +57,7 @@ The PnP CSOM implements the ALM APIs by calling the SharePoint REST API.
5757

5858
Before using any of the ALM APIs in PnP CSOM, you need to obtain an authenticated client context using the [Microsoft.SharePointOnline.CSOM](https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM). Then use the authenticated client context to get an instance of the PnP CSOM's **AppManager** object to call the ALM commands:
5959

60-
```cs
60+
```csharp
6161
using Microsoft.SharePoint.Client;
6262
using OfficeDevPnP.Core.ALM;
6363

@@ -72,7 +72,7 @@ using (var context = new ClientContext(webURL)) {
7272

7373
In all PnP Core methods, it's assumed the request targets the tenant app catalog in the tenant you connect to using the SharePoint CSOM `ClientContext` object. you can override the scope of all commands with an optional scope argument, for example
7474

75-
```cs
75+
```csharp
7676
appManager.Install('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx', AppCatalogScope.Site);
7777
```
7878

@@ -128,7 +128,7 @@ Byte array of the file
128128

129129
# [PnP CSOM](#tab/pnpcsom)
130130

131-
```cs
131+
```csharp
132132
// read file
133133
var filePath = "c:\path\to\file\sharepoint-solution-package.sppkg";
134134
// get an instance of the PnP CSOM's AppManager as shown above
@@ -190,7 +190,7 @@ POST /_api/web/{scope}appcatalog/AvailableApps/GetById('xxxxxxxx-xxxx-xxxx-xxxx-
190190
191191
# [PnP CSOM](#tab/pnpcsom)
192192

193-
```cs
193+
```csharp
194194
appManager.Deploy('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')
195195
```
196196

@@ -237,7 +237,7 @@ POST /_api/web/{scope}appcatalog/AvailableApps/GetById('xxxxxxxx-xxxx-xxxx-xxxx-
237237
238238
# [PnP CSOM](#tab/pnpcsom)
239239

240-
```cs
240+
```csharp
241241
// get an app package
242242
appManager.Retract('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')
243243
```
@@ -274,7 +274,7 @@ POST /_api/web/{scope}appcatalog/AvailableApps/GetById('xxxxxxxx-xxxx-xxxx-xxxx-
274274

275275
# [PnP CSOM](#tab/pnpcsom)
276276

277-
```cs
277+
```csharp
278278
appManager.Remove('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')
279279
```
280280

@@ -357,7 +357,7 @@ GET /_api/web/{scope}appcatalog/AvailableApps
357357

358358
# [PnP CSOM](#tab/pnpcsom)
359359

360-
```cs
360+
```csharp
361361
var allAppPackages = appManager.GetAvailable();
362362
```
363363

@@ -419,7 +419,7 @@ GET /_api/web/{scope}appcatalog/AvailableApps/GetById('xxxxxxxx-xxxx-xxxx-xxxx-x
419419

420420
# [PnP CSOM](#tab/pnpcsom)
421421

422-
```cs
422+
```csharp
423423
var appPackage = appManager.GetAvailable('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx');
424424
```
425425

@@ -463,7 +463,7 @@ POST /_api/web/{scope}appcatalog/AvailableApps/GetById('xxxxxxxx-xxxx-xxxx-xxxx-
463463

464464
# [PnP CSOM](#tab/pnpcsom)
465465

466-
```cs
466+
```csharp
467467
// get an app package
468468
appManager.Install('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')
469469
```
@@ -508,7 +508,7 @@ POST /_api/web/{scope}appcatalog/AvailableApps/GetById('xxxxxxxx-xxxx-xxxx-xxxx-
508508

509509
# [PnP CSOM](#tab/pnpcsom)
510510

511-
```cs
511+
```csharp
512512
// get an app package
513513
var appPackage = appManager.GetAvailable('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx');
514514
if (appPackage.CanUpgrade) {
@@ -559,7 +559,7 @@ POST /_api/web/{scope}appcatalog/AvailableApps/GetById('xxxxxxxx-xxxx-xxxx-xxxx-
559559

560560
# [PnP CSOM](#tab/pnpcsom)
561561

562-
```cs
562+
```csharp
563563
appManager.Uninstall('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')
564564
```
565565

@@ -603,7 +603,7 @@ POST /_api/web/{scope}appcatalog/SyncSolutionToTeams(id=xxxxx)
603603

604604
# [PnP CSOM](#tab/pnpcsom)
605605

606-
```cs
606+
```csharp
607607
appManager.SyncToTeams('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')
608608
```
609609

docs/apis/webhooks/get-started-webhooks.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Each notification generated by the service is serialized into a **webhookNotific
100100

101101
4. Add the following code to the body of the **SPWebhookNotification** class:
102102

103-
```cs
103+
```csharp
104104
public string SubscriptionId { get; set; }
105105

106106
public string ClientState { get; set; }
@@ -128,7 +128,7 @@ Because multiple notifications can be submitted to your webhook receiver in a si
128128

129129
4. Add the following code to the body of the **SPWebhookContent** class:
130130

131-
```cs
131+
```csharp
132132
public List<SPWebhookNotification> Value { get; set; }
133133
```
134134

@@ -162,7 +162,7 @@ A trace writer is required, so you must add a trace writer to the controller con
162162

163163
3. Add the following line inside the **Register** method:
164164

165-
```cs
165+
```csharp
166166
config.EnableSystemDiagnosticsTracing();
167167
```
168168

@@ -182,7 +182,7 @@ Now build the webhook receiver controller that handles the incoming requests fro
182182

183183
6. Replace the `using` statements with the following code:
184184

185-
```cs
185+
```csharp
186186
using Newtonsoft.Json;
187187
using SPWebhooksReceiver.Models;
188188
using System.Collections.Generic;
@@ -198,7 +198,7 @@ Now build the webhook receiver controller that handles the incoming requests fro
198198

199199
7. Replace the code in the **SPWebhookController** class with the following code:
200200

201-
```cs
201+
```csharp
202202
[HttpPost]
203203
public HttpResponseMessage HandleRequest()
204204
{
@@ -432,7 +432,7 @@ Now that you have the required information, construct the query and the request
432432

433433
The trace indicates that the webhook received initially received a validation request. If you look at the code, you'll see that it returns the validation token immediately so that SharePoint can validate the request:
434434

435-
```cs
435+
```csharp
436436
if (queryStringParams.AllKeys.Contains("validationtoken"))
437437
{
438438
httpResponse = new HttpResponseMessage(HttpStatusCode.OK);
@@ -496,7 +496,7 @@ Now add a file to the Documents library and test if you get a notification from
496496

497497
2. In the **SPWebhookController**, place a breakpoint on the following line of code:
498498

499-
```cs
499+
```csharp
500500
var requestContent = Request.Content.ReadAsStringAsync().Result;
501501
```
502502

docs/apis/webhooks/sharepoint-webhooks-using-azure-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ In our case, we want this Azure Function to behave as a SharePoint webhook servi
6363

6464
You can achieve this by replacing the default code with the following code:
6565

66-
```cs
66+
```csharp
6767
#r "Newtonsoft.Json"
6868

6969
using System.Net;

docs/apis/webhooks/webhooks-reference-implementation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ After you've requested SharePoint to add your webhook, SharePoint validates that
6161

6262
Take a look at the reference implementation, and you'll see that all webhook CRUD operations are consolidated in the [WebHookManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks.List/SharePoint.WebHooks.Common/WebHookManager.cs) class of the **SharePoint.WebHooks.Common** project. Adding a webhook is done by using the **AddListWebHookAsync** method:
6363

64-
```cs
64+
```csharp
6565
/// <summary>
6666
/// This method adds a webhook to a SharePoint list. Note that you need your webhook endpoint being passed into this method to be up and running and reachable from the internet
6767
/// </summary>
@@ -81,7 +81,7 @@ public async Task<SubscriptionModel> AddListWebHookAsync(string siteUrl, string
8181

8282
When making a call to SharePoint, you need to provide authentication information, and in this case you're using a **Bearer** authentication header with an **access token**. To obtain the access token, intercept the token via an **ExecutingWebRequest** event handler:
8383

84-
```cs
84+
```csharp
8585
ClientContext cc = null;
8686

8787
// Create SharePoint ClientContext object...

docs/declarative-customization/column-formatting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ An optional property that specifies the text content of the element specified by
10631063

10641064
An optional property that specifies style attributes to apply to the element specified by `elmType`. This is an object with name-value pairs that correspond to CSS names and values. The values of each property in the style object can either be a string (including special strings) or an Expression object. The following style attributes are allowed.
10651065

1066-
```JS
1066+
```javascript
10671067
'background-color'
10681068
'fill'
10691069
'background-image'

0 commit comments

Comments
 (0)