| Short | Description | Date | Long |
|---|---|---|---|
| https://aka.ms/ppcvscode | Power Platform Tools | 2023-09-06 | https://marketplace.visualstudio.com/items?itemName=microsoft-IsvExpTools.powerplatform-vscode |
| https://aka.ms/PowerQuerySDKDocs | Power Query SDK Docs | 2023-09-18 | https://learn.microsoft.com/en-us/power-query/power-query-sdk-vs-code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public string GetNamespaceStyle(Document document) | |
| { | |
| var options = await document.GetOptionsAsync(cancellationToken); | |
| var optionKey = new OptionKey(new Option<string>("code_style", "csharp_style_namespace_declarations", "block_scoped")); | |
| return options.GetOption<string>(optionKey); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ACustomCodeGenerator : BaseCodeGeneratorWithSite | |
| { | |
| private string? GetProjectProperty(string propertyName) | |
| { | |
| ThreadHelper.ThrowIfNotOnUIThread(); | |
| return GetService(typeof(IVsHierarchy)) is IVsHierarchy hierarchy ? hierarchy.GetProjectProperty(propertyName) : null; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Connect-Dataverse -Url https://something.crm.dynamics.com | |
| do { $result = Send-DataverseOperation "ordercloses?`$select=activityid" | | |
| Select-Object -ExpandProperty Content | | |
| ConvertFrom-Json | | |
| Select-Object -ExpandProperty value | | |
| ForEach-Object { [pscustomobject]@{ "Method"="DELETE"; "Uri"="ordercloses($($_.activityid))" } | ConvertTo-Json } | | |
| Send-DataverseOperation -BatchSize 200 -MaxDop 50 -ErrorVariable ErrOperation -OutputTable | |
| } while ( $result ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The wrong way: | |
| private GetVisualStudioDocument(SnapshotPoint triggerLocation) | |
| { | |
| // Get the VisualStudioWorkspace service | |
| var componentModel = (IComponentModel)Package.GetGlobalService(typeof(SComponentModel)); | |
| var workspace = componentModel.GetService<VisualStudioWorkspace>(); | |
| // Retrieve the document associated with the trigger location | |
| var documentId = workspace.CurrentSolution.GetDocumentId(triggerLocation.Snapshot.TextBuffer.AsTextContainer()); | |
| if (documentId == null) return CompletionContext.Empty; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const moment = require('moment'); | |
| var template = ` | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous"> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script> | |
| <style> | |
| .table-responsive-custom { | |
| display: block; | |
| width: 100%; | |
| overflow-x: auto; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Environment Variables: | |
| // url: <your-resource> example: https://myfancyapp.crm4.dynamics.com | |
| // clientid: <user-clientid-from-appreg> example: 1950a258-227b-4e31-a9cf-717495945fc2 | |
| // To know how to use this script, please read the following blog post: | |
| // https://bycode.dev/2024/04/04/automatically-authenticate-in-postman-with-pre-request-scripts/ | |
| const utils = { | |
| auth: { | |
| message: "", | |
| async refreshAuth() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <Project> | |
| <PropertyGroup> | |
| <LangVersion>11</LangVersion> | |
| <Nullable>disable</Nullable> | |
| </PropertyGroup> | |
| <PropertyGroup> | |
| <EnableNETAnalyzers>true</EnableNETAnalyzers> | |
| <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | |
| </PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Add-Path { | |
| param( | |
| [Parameter(Mandatory, Position=0)] | |
| [string] $LiteralPath, | |
| [ValidateSet('User', 'CurrentUser', 'Machine', 'LocalMachine')] | |
| [string] $Scope | |
| ) | |
| Set-StrictMode -Version 1; $ErrorActionPreference = 'Stop' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Xrm.Sdk; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| using System; | |
| namespace MyFancyPlugins.Tests.JsonConverters; | |
| /// <summary> | |
| /// Allows serialization / deserialization of <see cref="Microsoft.Xrm.Sdk.EntityCollection". This type is | |
| /// intended for unit-testing only./> |
NewerOlder