-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed Get-PnPTenant to generic retrieval of properties and using nu…
…llable types instead of using hardcoded defaults in the case of an exception
- Loading branch information
1 parent
8360d2d
commit f5b2a56
Showing
3 changed files
with
190 additions
and
592 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
|
||
namespace PnP.PowerShell.Commands.Attributes | ||
{ | ||
/// <summary> | ||
/// Attribute to specify the name of the property in the model that should be used to convert the value from the CSOM object to the model object | ||
/// </summary> | ||
/// <param name="propertyName">Name of the property on the CSOM object</param> | ||
/// <param name="skip">If set to true, the property will be skipped</param> | ||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] | ||
public class CsomToModelConverter(string propertyName = null, bool skip = false) : Attribute | ||
{ | ||
/// <summary> | ||
/// Name of the property on the CSOM object | ||
/// </summary> | ||
public string PropertyName { get; set; } = propertyName; | ||
|
||
/// <summary> | ||
/// If set to true, the property will be skipped | ||
/// </summary> | ||
public bool Skip { get; set; } = skip; | ||
} | ||
} |
Oops, something went wrong.