-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2289 from microsoftgraph/kiota/v1.0/pipelinebuild…
…/131601 Generated models and request builders
- Loading branch information
Showing
162 changed files
with
3,076 additions
and
422 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
4 changes: 2 additions & 2 deletions
4
src/Microsoft.Graph/Extensions/ChangeNotificationCollection.cs
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Security.Cryptography.X509Certificates; | ||
using Microsoft.Graph; | ||
|
||
namespace Microsoft.Graph.Models | ||
{ | ||
public static class SubscriptionExtensions | ||
{ | ||
/// <summary> | ||
/// Adds the public encryption certificate information for change notifications with resource data to the subscription creation information. | ||
/// </summary> | ||
/// <param name="subscription">The subscription instance of type <see cref="Subscription"/></param> | ||
/// <param name="certificate">Certificate to use for encryption</param> | ||
/// <exception cref="ArgumentNullException">Thrown when <paramref name="certificate"/> is null</exception> | ||
public static void AddPublicEncryptionCertificate(this Subscription subscription, X509Certificate2 certificate) | ||
{ | ||
if (certificate == null) | ||
throw new ArgumentNullException(nameof(certificate)); | ||
|
||
var tempSubscription = new EncryptableSubscription(); | ||
tempSubscription.AddPublicEncryptionCertificate(certificate); | ||
subscription.EncryptionCertificate = tempSubscription.EncryptionCertificate; | ||
} | ||
} | ||
|
||
internal class EncryptableSubscription : IEncryptableSubscription | ||
{ | ||
/// <summary> | ||
/// The encryption certificate | ||
/// </summary> | ||
public string EncryptionCertificate { get; set; } | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.