Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Rapp committed May 13, 2015
2 parents 2475958 + 1462747 commit 42a8067
Show file tree
Hide file tree
Showing 24 changed files with 1,023 additions and 264 deletions.
12 changes: 5 additions & 7 deletions Cinteros.XrmToolBox.Plugins.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersionVerificationTool", "VersionVerificationTool\VersionVerificationTool.csproj", "{2834BDB0-802C-4C6F-AA3B-A344FD21A206}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlMigrationTool", "XamlMigrationTool\XamlMigrationTool.csproj", "{CF2B4877-2505-4966-B630-8C89800030A5}"
Expand All @@ -24,8 +22,8 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2834BDB0-802C-4C6F-AA3B-A344FD21A206}.Debug All Cinteros XTB|Any CPU.ActiveCfg = Debug All Cinteros XTB|Any CPU
{2834BDB0-802C-4C6F-AA3B-A344FD21A206}.Debug All Cinteros XTB|Any CPU.Build.0 = Debug All Cinteros XTB|Any CPU
{2834BDB0-802C-4C6F-AA3B-A344FD21A206}.Debug All Cinteros XTB|Any CPU.ActiveCfg = Debug|Any CPU
{2834BDB0-802C-4C6F-AA3B-A344FD21A206}.Debug All Cinteros XTB|Any CPU.Build.0 = Debug|Any CPU
{2834BDB0-802C-4C6F-AA3B-A344FD21A206}.Debug Without GemBox|Any CPU.ActiveCfg = Debug|Any CPU
{2834BDB0-802C-4C6F-AA3B-A344FD21A206}.Debug Without GemBox|Any CPU.Build.0 = Debug|Any CPU
{2834BDB0-802C-4C6F-AA3B-A344FD21A206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -40,8 +38,8 @@ Global
{CF2B4877-2505-4966-B630-8C89800030A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF2B4877-2505-4966-B630-8C89800030A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF2B4877-2505-4966-B630-8C89800030A5}.Release|Any CPU.Build.0 = Release|Any CPU
{50A099FD-3A6D-4A4C-BE48-CCA0573D347B}.Debug All Cinteros XTB|Any CPU.ActiveCfg = Debug All Cinteros XTB|Any CPU
{50A099FD-3A6D-4A4C-BE48-CCA0573D347B}.Debug All Cinteros XTB|Any CPU.Build.0 = Debug All Cinteros XTB|Any CPU
{50A099FD-3A6D-4A4C-BE48-CCA0573D347B}.Debug All Cinteros XTB|Any CPU.ActiveCfg = Debug|Any CPU
{50A099FD-3A6D-4A4C-BE48-CCA0573D347B}.Debug All Cinteros XTB|Any CPU.Build.0 = Debug|Any CPU
{50A099FD-3A6D-4A4C-BE48-CCA0573D347B}.Debug Without GemBox|Any CPU.ActiveCfg = Debug|Any CPU
{50A099FD-3A6D-4A4C-BE48-CCA0573D347B}.Debug Without GemBox|Any CPU.Build.0 = Debug|Any CPU
{50A099FD-3A6D-4A4C-BE48-CCA0573D347B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Cinteros.Xrm.VersionVerificationTool.SDK
namespace Cinteros.Xrm.SDK
{
using System;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Cinteros.Xrm.VersionVerificationTool.SDK
namespace Cinteros.Xrm.SDK
{
public enum IsolationMode
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
namespace Cinteros.Xrm.VersionVerificationTool.SDK
namespace Cinteros.Xrm.SDK
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using Cinteros.Xrm.VersionVerificationTool.Utils;
using Cinteros.Xrm.Utils;
using McTools.Xrm.Connection;
using Microsoft.Xrm.Client;
using Microsoft.Xrm.Client.Services;
using Microsoft.Xrm.Sdk;

public class OrganizationSnapshot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Cinteros.Xrm.VersionVerificationTool.SDK
namespace Cinteros.Xrm.SDK
{
using System;
using Cinteros.Xrm.VersionVerificationTool.Utils;
using Cinteros.Xrm.Utils;
using Microsoft.Xrm.Sdk;

public class PluginAssembly : IComparableEntity
Expand All @@ -21,9 +21,14 @@ public PluginAssembly()
/// <param name="entity"></param>
public PluginAssembly(Entity entity)
{
this.Id = entity.Id;

this.FriendlyName = (string)entity.Attributes[Constants.Crm.Attributes.NAME];

this.IsolationMode = (IsolationMode)((OptionSetValue)entity.Attributes[Constants.Crm.Attributes.ISOLATION_MODE]).Value;
if (entity.Attributes.Contains(Constants.Crm.Attributes.ISOLATION_MODE))
{
this.IsolationMode = (IsolationMode)((OptionSetValue)entity.Attributes[Constants.Crm.Attributes.ISOLATION_MODE]).Value;
}

this.UniqueName = string.Format("{0}, Version={1}, Culture={2}, PublicKeyToken={3}",
this.FriendlyName,
Expand All @@ -47,6 +52,15 @@ public string FriendlyName
set;
}

/// <summary>
/// Gets assembly's id
/// </summary>
public Guid Id
{
get;
private set;
}

/// <summary>
/// Gets or sets assembly's Isolation Mode
/// </summary>
Expand Down
85 changes: 85 additions & 0 deletions Common/SDK/PluginType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
namespace Cinteros.Xrm.SDK
{
using System;
using Cinteros.Xrm.Utils;
using Microsoft.Xrm.Sdk;

public class PluginType
{
#region Private Fields

private Entity origin;

#endregion Private Fields

#region Public Constructors

/// <summary>
/// Initializes a new instance of the <see cref="PluginType"/> class.
/// </summary>
public PluginType()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="PluginType"/> class.
/// </summary>
/// <param name="entity"></param>
public PluginType(Entity entity, PluginAssembly parentAssembly)
{
this.origin = entity;

this.Id = entity.Id;
this.ParentAssembly = parentAssembly;

this.FriendlyName = (string)entity.Attributes[Constants.Crm.Attributes.NAME];
}

#endregion Public Constructors

#region Public Properties

/// <summary>
/// Gets friendly name of plugin type
/// </summary>
public string FriendlyName
{
get;
private set;
}

/// <summary>
/// Gets id of plugin type
/// </summary>
public Guid Id
{
get;
private set;
}

/// <summary>
/// Gets information about parent assembly
/// </summary>
public PluginAssembly ParentAssembly
{
get;
private set;
}

#endregion Public Properties

#region Public Methods

public Entity ToEntity()
{
return this.origin;
}

public override string ToString()
{
return this.FriendlyName;
}

#endregion Public Methods
}
}
105 changes: 105 additions & 0 deletions Common/SDK/ProcessingStep.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
namespace Cinteros.Xrm.SDK
{
using System;
using Cinteros.Xrm.Utils;
using Microsoft.Xrm.Sdk;

public class ProcessingStep
{
#region Private Fields

private Entity origin;

#endregion Private Fields

#region Public Constructors

/// <summary>
/// Initializes a new instance of the <see cref="ProcessingStep"/> class.
/// </summary>
public ProcessingStep()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ProcessingStep"/> class.
/// </summary>
/// <param name="entity"></param>
public ProcessingStep(Entity entity, PluginAssembly parentAssembly, PluginType parentType)
{
this.origin = entity;

this.Id = entity.Id;
this.ParentAssembly = parentAssembly;
this.ParentType = parentType;

this.FriendlyName = (string)entity.Attributes[Constants.Crm.Attributes.NAME];
this.StateCode = (StateCode)((OptionSetValue)entity.Attributes[Constants.Crm.Attributes.STATE_CODE]).Value;
}

#endregion Public Constructors

#region Public Properties

/// <summary>
/// Gets friendly name of plugin type
/// </summary>
public string FriendlyName
{
get;
private set;
}

/// <summary>
/// Gets id of plugin type
/// </summary>
public Guid Id
{
get;
private set;
}

/// <summary>
/// Gets information about parent plugin assembly
/// </summary>
public PluginAssembly ParentAssembly
{
get;
private set;
}

/// <summary>
/// Gets information about parent plugin type
/// </summary>
public PluginType ParentType
{
get;
private set;
}

/// <summary>
/// Gets information about state code of the entity
/// </summary>
public StateCode StateCode
{
get;
private set;
}

#endregion Public Properties

#region Public Methods

public Entity ToEntity()
{
return this.origin;
}

public override string ToString()
{
return this.FriendlyName;
}

#endregion Public Methods
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Cinteros.Xrm.VersionVerificationTool.SDK
namespace Cinteros.Xrm.SDK
{
using System;
using Cinteros.Xrm.VersionVerificationTool.Utils;
using Cinteros.Xrm.Utils;
using Microsoft.Xrm.Sdk;

public class Solution : IComparableEntity
Expand Down
8 changes: 8 additions & 0 deletions Common/SDK/StateCode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Cinteros.Xrm.SDK
{
public enum StateCode
{
Active = 0,
Inactive = 1
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Cinteros.Xrm.VersionVerificationTool.Utils
namespace Cinteros.Xrm.Utils
{
/// <summary>
/// Structure holding constants
Expand Down Expand Up @@ -38,14 +38,18 @@ internal struct Attributes
#region Internal Fields

internal const string CULTURE = "culture";
internal const string EVENT_HANDLER = "eventhandler";
internal const string FRIENDLY_NAME = "friendlyname";
internal const string ISOLATION_MODE = "isolationmode";
internal const string IS_HIDDEN = "ishidden";
internal const string IS_MANAGED = "ismanaged";
internal const string IS_VISIBLE = "isvisible";
internal const string ISOLATION_MODE = "isolationmode";
internal const string NAME = "name";
internal const string PLUGIN_TYPE_ID = "plugintypeid";
internal const string PUBLIC_KEY_TOKEN = "publickeytoken";
internal const string SOLUTION_ID = "solutionid";
internal const string STATE_CODE = "statecode";
internal const string STATUS_CODE = "statuscode";
internal const string UNIQUE_NAME = "uniquename";
internal const string VERSION = "version";

Expand All @@ -64,6 +68,16 @@ internal struct Entities
/// </summary>
internal const string PLUGIN_ASSEMBLY = "pluginassembly";

/// <summary>
/// Name of the 'plugintype' entity
/// </summary>
internal const string PLUGIN_TYPE = "plugintype";

/// <summary>
/// Name of the 'sdkmessageprocessingstep' entity
/// </summary>
internal const string PROCESSING_STEP = "sdkmessageprocessingstep";

/// <summary>
/// Name of the 'solution' entity
/// </summary>
Expand Down Expand Up @@ -168,4 +182,4 @@ internal struct Xml

#endregion Internal Structs
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Cinteros.Xrm.VersionVerificationTool.Utils
namespace Cinteros.Xrm.Utils
{
using System;
using System.Collections.Generic;
using System.Xml;
using Cinteros.Xrm.VersionVerificationTool.SDK;
using Cinteros.Xrm.SDK;

public static class Extensions
{
Expand Down Expand Up @@ -82,7 +82,6 @@ public static XmlDocument ToXml(this OrganizationSnapshot[] matrix)
}

return document;

}

#endregion Public Methods
Expand Down
Loading

0 comments on commit 42a8067

Please sign in to comment.