-
Notifications
You must be signed in to change notification settings - Fork 15
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 #34 from phuocle/develop
Develop
- Loading branch information
Showing
617 changed files
with
215,313 additions
and
215,123 deletions.
There are no files selected for viewing
116 changes: 116 additions & 0 deletions
116
test/Abc.LuckyStar/Abc.LuckyStar.Console.2/Abc.LuckyStar.Console.2.csproj
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,116 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>25c30019-e2d3-450e-8cc9-70d717b53aff</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Abc.LuckyStar.Console._2</RootNamespace> | ||
<AssemblyName>Abc.LuckyStar.Console.2</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<PlatformTarget>x64</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<OutputPath>..\Release\console\Abc.LuckyStar.Console.2</OutputPath> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<DefineConstants></DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<NoWarn>CS8032</NoWarn> | ||
<DebugSymbols>true</DebugSymbols> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.Crm.Sdk.Proxy"> | ||
<HintPath>..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.23\lib\net462\Microsoft.Crm.Sdk.Proxy.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Xrm.Sdk"> | ||
<HintPath>..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.23\lib\net462\Microsoft.Xrm.Sdk.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Xrm.Sdk.Workflow"> | ||
<HintPath>..\packages\Microsoft.CrmSdk.Workflow.9.0.2.23\lib\net462\Microsoft.Xrm.Sdk.Workflow.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Xrm.Sdk.Deployment"> | ||
<HintPath>..\packages\Microsoft.CrmSdk.Deployment.9.0.2.23\lib\net462\Microsoft.Xrm.Sdk.Deployment.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Xrm.Tooling.Connector"> | ||
<HintPath>..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.9.1.0.38\lib\net462\Microsoft.Xrm.Tooling.Connector.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.5.2.7\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Microsoft.Rest.ClientRuntime.2.3.21\lib\net461\Microsoft.Rest.ClientRuntime.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="PresentationFramework" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Activities" /> | ||
<Reference Include="System.Activities.Presentation" /> | ||
<Reference Include="System.Configuration" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.IdentityModel" /> | ||
<Reference Include="System.Net" /> | ||
<Reference Include="System.Net.Http.WebRequest" /> | ||
<Reference Include="System.Runtime" /> | ||
<Reference Include="System.Runtime.Serialization" /> | ||
<Reference Include="System.ServiceModel" /> | ||
<Reference Include="System.ServiceModel.Web" /> | ||
<Reference Include="System.Web.Services" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Workflow.Activities" /> | ||
<Reference Include="System.Workflow.ComponentModel" /> | ||
<Reference Include="System.Workflow.Runtime" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="AppSettings.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="..\Abc.LuckyStar.Shared\Abc.LuckyStar.Shared.projitems" Label="Shared" Condition="Exists('..\Abc.LuckyStar.Shared\Abc.LuckyStar.Shared.projitems')" /> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<ItemGroup> | ||
<Analyzer Include="..\packages\DynamicsCrm.DevKit.Analyzers.2.1.1\analyzers\dotnet\cs\DynamicsCrm.DevKit.Analyzers.dll" /> | ||
</ItemGroup> | ||
</Project> |
25 changes: 15 additions & 10 deletions
25
...uckyStar.Workflow.Account.Test/app.config → ...kyStar/Abc.LuckyStar.Console.2/App.config
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 |
---|---|---|
@@ -1,23 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<appSettings> | ||
<add key="AuthType" value="ClientSecret" /> | ||
<add key="Url" value="https://orgcaffa69c.crm5.dynamics.com" /> | ||
<add key="ClientId" value="e31fc7d6-4dce-46e3-8677-04ab0a2968e3" /> | ||
<add key="ClientSecret" value="?-iwRSB0te8o]pHX_yVQLJnUqziB1E0h" /> | ||
</appSettings> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Microsoft.Xrm.Tooling.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> | ||
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> | ||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> | ||
</configuration> |
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,35 @@ | ||
using System; | ||
using System.Configuration; | ||
using System.Net; | ||
using Microsoft.Xrm.Sdk; | ||
using Microsoft.Xrm.Tooling.Connector; | ||
|
||
namespace Abc.LuckyStar.Console._2 | ||
{ | ||
public static class AppSettings | ||
{ | ||
public static IOrganizationService Service = InitializeIOrganizationService(); | ||
private static string AuthType { get { return ConfigurationManager.AppSettings["AuthType"]; } } | ||
private static string Url { get { return ConfigurationManager.AppSettings["Url"]; } } | ||
private static string ClientId { get { return ConfigurationManager.AppSettings["ClientId"]; } } | ||
private static string ClientSecret { get { return ConfigurationManager.AppSettings["ClientSecret"]; } } | ||
private static string ConnectionString | ||
{ | ||
get | ||
{ | ||
return $"AuthType={AuthType};Url={Url};ClientId={ClientId};ClientSecret={ClientSecret};"; | ||
} | ||
} | ||
static IOrganizationService InitializeIOrganizationService() | ||
{ | ||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; | ||
var crmServiceClient = new CrmServiceClient(ConnectionString); | ||
if (crmServiceClient.OrganizationServiceProxy != null) | ||
return (IOrganizationService)crmServiceClient.OrganizationServiceProxy; | ||
else if (crmServiceClient.OrganizationWebProxyClient != null) | ||
return (IOrganizationService)crmServiceClient.OrganizationWebProxyClient; | ||
else | ||
throw new Exception("Service NULL"); | ||
} | ||
} | ||
} |
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,14 @@ | ||
using Microsoft.Crm.Sdk.Messages; | ||
|
||
namespace Abc.LuckyStar.Console._2 | ||
{ | ||
public class Program | ||
{ | ||
static void Main() | ||
{ | ||
var UserId = ((WhoAmIResponse)AppSettings.Service.Execute(new WhoAmIRequest())).UserId; | ||
System.Console.WriteLine(UserId); | ||
System.Console.ReadKey(); | ||
} | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
test/Abc.LuckyStar/Abc.LuckyStar.Console.2/packages.config
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="DynamicsCrm.DevKit.Cli" version="2.1.1" /> | ||
<package id="DynamicsCrm.DevKit.Analyzers" version="2.1.1" /> | ||
<package id="Microsoft.CrmSdk.Deployment" version="9.0.2.23" targetFramework="net462" /> | ||
<package id="Microsoft.CrmSdk.XrmTooling.CoreAssembly" version="9.1.0.38" targetFramework="net462" /> | ||
<package id="Microsoft.CrmSdk.CoreAssemblies" version="9.0.2.23" targetFramework="net462" /> | ||
<package id="Microsoft.CrmSdk.Workflow" version="9.0.2.23" targetFramework="net462" /> | ||
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="5.2.7" targetFramework="net462" /> | ||
<package id="Microsoft.Rest.ClientRuntime" version="2.3.21" targetFramework="net462" /> | ||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" /> | ||
<package id="System.Net.Http" version="4.3.4" targetFramework="net462" /> | ||
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" /> | ||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" /> | ||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" /> | ||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" /> | ||
</packages> |
Oops, something went wrong.