Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Commit

Permalink
Release v1.2.4.0
Browse files Browse the repository at this point in the history
Added CmdLets for plugin registration.
Update Path parameters to match PowerShell best practices
Type Converter for EntityReference to Guid
Included RelatedEntities in Get-CrmContent
Handle AliassedValues in EntityPropertyAdapter
Made Cmdlet classes sealed, and all helper classes Internal
  • Loading branch information
AMSoftwareNL committed Apr 27, 2017
1 parent 0ec1a37 commit 018561a
Show file tree
Hide file tree
Showing 177 changed files with 16,560 additions and 17,489 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,21 @@
<Compile Include="Content\RemoveContentCommand.cs" />
<Compile Include="Content\SetContentCommand.cs" />
<Compile Include="Administration\StartProcessCommand.cs" />
<Compile Include="Plugins\SetServiceEndpointCommand.cs" />
<Compile Include="Plugins\RegisterServiceEndpointCommand.cs" />
<Compile Include="Plugins\UnregisterPluginCommand.cs" />
<Compile Include="Plugins\SetPluginStepStateCommand.cs" />
<Compile Include="Plugins\SetPluginStepImageCommand.cs" />
<Compile Include="Plugins\RegisterPluginStepImageCommand.cs" />
<Compile Include="Plugins\SetPluginStepCommand.cs" />
<Compile Include="Plugins\RegisterPluginStepCommand.cs" />
<Compile Include="Plugins\SetPluginCommand.cs" />
<Compile Include="Plugins\RegisterPluginCommand.cs" />
<Compile Include="Plugins\GetServiceEndpointCommand.cs" />
<Compile Include="Plugins\GetPluginImageCommand.cs" />
<Compile Include="Plugins\GetPluginStepCommand.cs" />
<Compile Include="Plugins\GetPluginCommand.cs" />
<Compile Include="Plugins\GetPluginAssemblyCommand.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Customizations\UseSolutionCommand.cs" />
<Compile Include="UseLanguageCommand.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Add, "Language", HelpUri = HelpUrlConstants.AddLanguageHelpUrl, ConfirmImpact = ConfirmImpact.High, SupportsShouldProcess = true)]
public class AddLanguageCommand : CrmOrganizationConfirmActionCmdlet
public sealed class AddLanguageCommand : CrmOrganizationConfirmActionCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "BusinessUnit", HelpUri = HelpUrlConstants.GetBusinessUnitHelpUrl, SupportsPaging = true, DefaultParameterSetName = GetAllBusinessUnitsParameterSet)]
[OutputType(typeof(Entity))]
public class GetBusinessUnitCommand : CrmOrganizationCmdlet
public sealed class GetBusinessUnitCommand : CrmOrganizationCmdlet
{
private const string GetAllBusinessUnitsParameterSet = "GetAllBusinessUnits";
private const string GetBusinessUnitByIdParameterSet = "GetBusinessUnitById";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "Language", HelpUri = HelpUrlConstants.GetLanguageHelpUrl)]
[OutputType(typeof(CultureInfo))]
public class GetLanguageCommand : CrmOrganizationCmdlet
public sealed class GetLanguageCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "PrincipalRoles", HelpUri = HelpUrlConstants.GetPrincipalRolesHelpUrl)]
[OutputType(typeof(Entity))]
public class GetPrincipalRolesCommand : CrmOrganizationCmdlet
public sealed class GetPrincipalRolesCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "Process", HelpUri = HelpUrlConstants.GetProcessHelpUrl, SupportsPaging = true, DefaultParameterSetName = GetAllProcessesParameterSet)]
[OutputType(typeof(Entity))]
public class GetProcessCommand : CrmOrganizationCmdlet
public sealed class GetProcessCommand : CrmOrganizationCmdlet
{
private const string GetAllProcessesParameterSet = "GetAllProcesses";
private const string GetProcessByNameParameterSet = "GetProcessByName";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "Role", HelpUri = HelpUrlConstants.GetRoleHelpUrl, SupportsPaging = true, DefaultParameterSetName = GetAllRolesParameterSet)]
[OutputType(typeof(Entity))]
public class GetRoleCommand : CrmOrganizationCmdlet
public sealed class GetRoleCommand : CrmOrganizationCmdlet
{
private const string GetAllRolesParameterSet = "GetAllRoles";
private const string GetRoleByIdParameterSet = "GetRoleById";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "RolePrincipals", HelpUri = HelpUrlConstants.GetRolePrincipalsHelpUrl)]
[OutputType(typeof(Entity))]
public class GetRolePrincipalsCommand : CrmOrganizationCmdlet
public sealed class GetRolePrincipalsCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "Team", HelpUri = HelpUrlConstants.GetTeamHelpUrl, SupportsPaging = true, DefaultParameterSetName = GetAllTeamsParameterSet)]
[OutputType(typeof(Entity))]
public class GetTeamCommand : CrmOrganizationCmdlet
public sealed class GetTeamCommand : CrmOrganizationCmdlet
{
private const string GetAllTeamsParameterSet = "GetAllTeams";
private const string GetTeamByIdParameterSet = "GetTeamById";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "TeamUsers", HelpUri = HelpUrlConstants.GetTeamUsersHelpUrl)]
[OutputType(typeof(Entity))]
public class GetTeamUsersCommand : CrmOrganizationCmdlet
public sealed class GetTeamUsersCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "User", HelpUri = HelpUrlConstants.GetUserHelpUrl, SupportsPaging = true, DefaultParameterSetName = GetAllUsersParameterSet)]
[OutputType(typeof(Entity))]
public class GetUserCommand : CrmOrganizationCmdlet
public sealed class GetUserCommand : CrmOrganizationCmdlet
{
private const string GetAllUsersParameterSet = "GetAllUsers";
private const string GetUserByUserNameParameterSet = "GetUserByUserName";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Get, "UserTeams", HelpUri = HelpUrlConstants.GetUserTeamsHelpUrl)]
[OutputType(typeof(Entity))]
public class GetUserTeamsCommand : CrmOrganizationCmdlet
public sealed class GetUserTeamsCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsLifecycle.Invoke, "Request", HelpUri = HelpUrlConstants.InvokeRequestHelpUrl)]
public class InvokeRequestCommand : CrmOrganizationCmdlet
public sealed class InvokeRequestCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.New, "BusinessUnit", HelpUri = HelpUrlConstants.NewBusinessUnitHelpUrl)]
[OutputType(typeof(Entity))]
public class NewBusinessUnitCommand : CrmOrganizationCmdlet
public sealed class NewBusinessUnitCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.New, "Role", HelpUri = HelpUrlConstants.NewRoleHelpUrl)]
[OutputType(typeof(Entity))]
public class NewRoleCommand : CrmOrganizationCmdlet
public sealed class NewRoleCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.New, "Team", HelpUri = HelpUrlConstants.NewTeamHelpUrl)]
[OutputType(typeof(Entity))]
public class NewTeamCommand : CrmOrganizationCmdlet
public sealed class NewTeamCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.New, "User", HelpUri = HelpUrlConstants.NewUserHelpUrl)]
[OutputType(typeof(Entity))]
public class NewUserCommand : CrmOrganizationCmdlet
public sealed class NewUserCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Remove, "Language", HelpUri = HelpUrlConstants.RemoveLanguageHelpUrl, ConfirmImpact = ConfirmImpact.High, SupportsShouldProcess = true)]
public class RemoveLanguageCommand : CrmOrganizationConfirmActionCmdlet
public sealed class RemoveLanguageCommand : CrmOrganizationConfirmActionCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Remove, "UserParent", HelpUri = HelpUrlConstants.RemoveUserParentHelpUrl, SupportsShouldProcess = true)]
public class RemoveUserParentCommand : CrmOrganizationActionCmdlet
public sealed class RemoveUserParentCommand : CrmOrganizationActionCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Set, "Owner", HelpUri = HelpUrlConstants.SetOwnerHelpUrl)]
public class SetOwnerCommand : CrmOrganizationCmdlet
public sealed class SetOwnerCommand : CrmOrganizationCmdlet
{
private const string AssignOwnerEntityParameterSet = "AssignOwnerEntity";
private const string AssignOwnerRecordParameterSet = "AssignOwnerRecord";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Set, "PrincipalRoles", HelpUri = HelpUrlConstants.SetPrincipalRolesHelpUrl)]
public class SetPrincipalRolesCommand : CrmOrganizationCmdlet
public sealed class SetPrincipalRolesCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Set, "RolePrincipals", HelpUri = HelpUrlConstants.SetRolePrincipalsHelpUrl)]
public class SetRolePrincipalsCommand : CrmOrganizationCmdlet
public sealed class SetRolePrincipalsCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Set, "TeamUsers", HelpUri = HelpUrlConstants.SetTeamUsersHelpUrl)]
public class SetTeamUsersCommand : CrmOrganizationCmdlet
public sealed class SetTeamUsersCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsCommon.Set, "UserTeams", HelpUri = HelpUrlConstants.SetUserTeamsHelpUrl)]
public class SetUserTeamsCommand : CrmOrganizationCmdlet
public sealed class SetUserTeamsCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsLifecycle.Start, "Process", HelpUri = HelpUrlConstants.StartProcessHelpUrl, SupportsShouldProcess = true)]
[OutputType(typeof(Guid))]
public class StartProcessCommand : CrmOrganizationActionCmdlet
public sealed class StartProcessCommand : CrmOrganizationActionCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Administration
{
[Cmdlet(VerbsLifecycle.Stop, "Process", HelpUri = HelpUrlConstants.StopProcessHelpUrl, ConfirmImpact = ConfirmImpact.High, SupportsShouldProcess = true, DefaultParameterSetName = StopProcessByAsyncOperationParameterSet)]
public class StopProcessCommand : CrmOrganizationConfirmActionCmdlet
public sealed class StopProcessCommand : CrmOrganizationConfirmActionCmdlet
{
private const string StopProcessByAsyncOperationParameterSet = "StopProcessByAsyncOperation";
private const string StopProcessByWorkflowParameterSet = "StopProcessByWorkflow";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Content
{
[Cmdlet(VerbsCommon.Add, "Content", HelpUri = HelpUrlConstants.AddContentHelpUrl, DefaultParameterSetName = AddContentByInputObjectParameterSet)]
[OutputType(typeof(Entity))]
public class AddContentCommand : CrmOrganizationCmdlet
public sealed class AddContentCommand : CrmOrganizationCmdlet
{
private const string AddContentParameterSet = "AddContent";
private const string AddContentByInputObjectParameterSet = "AddContentByInputObject";
Expand Down
10 changes: 7 additions & 3 deletions AMSoftware.Crm.PowerShell.Commands/Content/GetContentCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace AMSoftware.Crm.PowerShell.Commands.Content
{
[Cmdlet(VerbsCommon.Get, "Content", HelpUri = HelpUrlConstants.GetContentHelpUrl, SupportsPaging = true, DefaultParameterSetName = GetContentForEntityByQueryParameterSet)]
[OutputType(typeof(Entity))]
public class GetContentCommand : CrmOrganizationCmdlet
public sealed class GetContentCommand : CrmOrganizationCmdlet
{
private const string GetContentForEntityByIdParameterSet = "GetContentForEntityById";
private const string GetContentForEntityByKeysParameterSet = "GetContentForEntityByKeys";
Expand Down Expand Up @@ -59,6 +59,10 @@ public class GetContentCommand : CrmOrganizationCmdlet
[ValidateNotNull]
public Hashtable Order { get; set; }

[Parameter(ParameterSetName = GetContentForEntityByIdParameterSet)]
[Parameter(ParameterSetName = GetContentForEntityByKeysParameterSet)]
public Hashtable RelatedEntities { get; set; }

[Parameter(ValueFromRemainingArguments = true, ParameterSetName = GetContentForEntityByIdParameterSet)]
[Parameter(ValueFromRemainingArguments = true, ParameterSetName = GetContentForEntityByQueryParameterSet)]
[Parameter(ValueFromRemainingArguments = true, ParameterSetName = GetContentForEntityByKeysParameterSet)]
Expand All @@ -75,10 +79,10 @@ protected override void ExecuteCmdlet()
switch (this.ParameterSetName)
{
case GetContentForEntityByIdParameterSet:
WriteObject(_repository.Get(Entity, Id, Columns), false);
WriteObject(_repository.Get(Entity, Id, Columns, RelatedEntities), false);
break;
case GetContentForEntityByKeysParameterSet:
WriteObject(_repository.Get(Entity, Keys, Columns), false);
WriteObject(_repository.Get(Entity, Keys, Columns, RelatedEntities), false);
break;
case GetContentForEntityByQueryParameterSet:
QueryBase queryFromQuery = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Content
{
[Cmdlet(VerbsCommon.Join, "Content", HelpUri = HelpUrlConstants.JoinContentHelpUrl)]
public class JoinContentCommand : CrmOrganizationCmdlet
public sealed class JoinContentCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Content
{
[Cmdlet(VerbsCommon.Remove, "Content", HelpUri = HelpUrlConstants.RemoveContentHelpUrl, SupportsShouldProcess = true)]
public class RemoveContentCommand : CrmOrganizationConfirmActionCmdlet
public sealed class RemoveContentCommand : CrmOrganizationConfirmActionCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Content
{
[Cmdlet(VerbsCommon.Set, "Content", HelpUri = HelpUrlConstants.SetContentHelpUrl, DefaultParameterSetName = SetContentByInputObjectParameterSet)]
public class SetContentCommand : CrmOrganizationCmdlet
public sealed class SetContentCommand : CrmOrganizationCmdlet
{
private const string SetContentParameterSet = "SetContent";
private const string SetContentByInputObjectParameterSet = "SetContentByInputObject";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You should have received a copy of the GNU Affero General Public License
namespace AMSoftware.Crm.PowerShell.Commands.Content
{
[Cmdlet(VerbsCommon.Split, "Content", HelpUri = HelpUrlConstants.SplitContentHelpUrl)]
public class SplitContentCommand : CrmOrganizationCmdlet
public sealed class SplitContentCommand : CrmOrganizationCmdlet
{
private ContentRepository _repository = new ContentRepository();

Expand Down
Loading

0 comments on commit 018561a

Please sign in to comment.