Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push into Nuget #94

Merged
merged 117 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
7bad956
Removed win only target frameworks, and updated to DataverseClient 0.…
jordimontana82 Nov 3, 2021
84bf43b
FAKE_XRM_EASy configuration (2011 ish) stuff won't be supported in v3
jordimontana82 Nov 3, 2021
008e5b0
Working on DynamicsValue/fake-xrm-easy#5
jordimontana82 Nov 5, 2021
87dd250
Added IOrganizationServiceAsync methods, now working on IOrganization…
jordimontana82 Nov 5, 2021
afd0bdc
Added IOrganizationServiceAsync2 implementation for DynamicsValue/fak…
jordimontana82 Nov 5, 2021
fb29125
Update license exception message
jordimontana82 Nov 21, 2021
8084da8
Merge branch 'master' into 3x (licensing exception update
jordimontana82 Nov 21, 2021
bc264fd
Merge branch 'main' into 3x
jordimontana82 Nov 23, 2021
e147688
Merge branch 'main' into 3x
jordimontana82 Nov 28, 2021
1772722
Merge branch 'fix-xunit-warnings' into 3x-dev
jordimontana82 Dec 1, 2021
fab01bf
Remove parameterless constructor, connection strings will need to be …
jordimontana82 Dec 4, 2021
73bb8cf
Merge branch '2x-dev' into 3x-dev
jordimontana82 Mar 11, 2022
461cf2b
Add 3.0.1 baseline to release notes DynamicsValue/fake-xrm-easy#13
jordimontana82 Mar 11, 2022
af71c12
Updated version, remove suffix for DynamicsValue/fake-xrm-easy#20
jordimontana82 Mar 15, 2022
888b865
Fix package dependencies
jordimontana82 Mar 15, 2022
0856723
Merge branch '2x-dev' into 3x-dev
jordimontana82 May 19, 2022
dc80710
Update version to 3.1.0 after being merged from 2.1.0
jordimontana82 May 19, 2022
2a55e96
Merge from 2x-dev
jordimontana82 May 30, 2022
af8b8ed
Bump dataverse dependency to 1.0.1
jordimontana82 Jun 14, 2022
6060d03
Trigger a new build
jordimontana82 Jun 14, 2022
325bd4f
Merge from 2x-dev
jordimontana82 Sep 6, 2022
72730cc
Add some missing XML comments
jordimontana82 Sep 6, 2022
2e3ca49
More missing XML comments
jordimontana82 Sep 6, 2022
fefbcf5
Merge pull request #20 from DynamicsValue/3x-dev-merge
jordimontana82 Sep 6, 2022
d5e3a5d
Merge from 2x-dev and add FXE license to RealContext in tests
jordimontana82 Dec 22, 2022
9d547be
Add missing xml comment
jordimontana82 Dec 22, 2022
2d0d0e2
Merge pull request #27 from DynamicsValue/feature/merge-from-2x
jordimontana82 Dec 22, 2022
a5bbc9c
Merge branch '2x-dev' into 3x-dev
jordimontana82 Dec 22, 2022
5080b5f
Upgrade to net6.0 DynamicsValue/fake-xrm-easy#90
jordimontana82 Mar 20, 2023
8b88228
Merge pull request #37 from DynamicsValue/feature/3x-upgrade-to-net6
jordimontana82 Mar 20, 2023
ca18778
Merge branch '2x-dev' into 3x-dev-merge-from-2x
jordimontana82 Oct 15, 2023
7611572
Upgrade dotnet sonar scanner action
jordimontana82 Oct 15, 2023
568845d
Upgrade package versions
jordimontana82 Oct 15, 2023
e26fb92
Add CdsServiceClient package to DataverseEntities.csproj and replace …
jordimontana82 Oct 15, 2023
06dd902
Merge pull request #48 from DynamicsValue/3x-dev-merge-from-2x
jordimontana82 Oct 15, 2023
9d87042
Replace UnionWith for an empty collection so it's compliant with Sonar
jordimontana82 Oct 15, 2023
88294b4
Merge pull request #49 from DynamicsValue/sonar-bug-fixes
jordimontana82 Oct 15, 2023
3a2932a
Upgrade dotnetsonnarscanner for Nugetpush action
jordimontana82 Oct 15, 2023
f252ee0
Merge branch '2x-dev' into feature/3x-licensing-updates
jordimontana82 Feb 2, 2024
a43f784
Increment version
jordimontana82 Feb 2, 2024
b0d4ea8
Windows.Security principal is not supported on non Windows OSs
jordimontana82 Feb 2, 2024
db60348
Merge pull request #56 from DynamicsValue/feature/3x-licensing-updates
jordimontana82 Feb 2, 2024
ce9879c
Merge branch '2x-dev' into feature/3x-user-reader-update
jordimontana82 Feb 3, 2024
1a9a871
Merge pull request #58 from DynamicsValue/feature/3x-user-reader-update
jordimontana82 Feb 3, 2024
5ac9a5c
Merge branch '2x-dev' into 3x-logging-update
jordimontana82 Feb 4, 2024
a73f094
Merge pull request #60 from DynamicsValue/3x-logging-update
jordimontana82 Feb 4, 2024
eab24c7
Merge branch '2x-dev' into 3x-improvements
jordimontana82 Feb 4, 2024
eec505c
Merge pull request #62 from DynamicsValue/3x-improvements
jordimontana82 Feb 4, 2024
733fcf2
Merge branch '2x-dev' into 3x-improvements
jordimontana82 Feb 14, 2024
fbde9dd
Merge pull request #69 from DynamicsValue/3x-improvements
jordimontana82 Feb 14, 2024
b00ecd8
Merge branch '2x-dev' into feature/35x-updates
jordimontana82 Jun 11, 2024
fee34a6
35x updates
jordimontana82 Jun 12, 2024
18c0127
Merge branch '2x-dev' into feature/35x-updates
jordimontana82 Jun 15, 2024
6634695
Merge pull request #81 from DynamicsValue/feature/35x-updates
jordimontana82 Jun 15, 2024
a82b1c6
Revert "Feature/35x updates"
jordimontana82 Jun 15, 2024
7177f4d
Merge pull request #82 from DynamicsValue/revert-81-feature/35x-updates
jordimontana82 Jun 15, 2024
a1f9402
Adds support for RelatedEntities to Update message, implements clonin…
jordimontana82 Jul 6, 2024
177d59b
Increment version and update CHANGELOG.md DynamicsValue/fake-xrm-easy…
jordimontana82 Jul 6, 2024
5ae9175
Resolves DynamicsValue/fake-xrm-easy#135
jordimontana82 Jul 17, 2024
a434347
Upgrade version, added initial work on DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 1, 2024
1c46f28
Add necessary conditional precompilation symbols
jordimontana82 Aug 1, 2024
ccdfeb2
Fix typo after precompilation symbol
jordimontana82 Aug 1, 2024
f0dadc2
Add precompilation symbols for image generated attributes
jordimontana82 Aug 1, 2024
42711a6
Merge pull request #86 from DynamicsValue/feature/26-updates
jordimontana82 Aug 2, 2024
3f4978e
Initial work on DynamicsValue/fake-xm-easy#157
jordimontana82 Aug 3, 2024
1ed214b
Use BlockUploadProperties as opposed to BlockUploadRequest
jordimontana82 Aug 4, 2024
a11691f
Update CHANGELOG.md
jordimontana82 Aug 4, 2024
e85ab16
Fix code smells DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 4, 2024
97a4165
Adding implementation for file block uploads, and commiting of file b…
jordimontana82 Aug 5, 2024
0ac5e1a
Change lock to an object instance
jordimontana82 Aug 5, 2024
5eaa7e6
Add small concurrency test DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 5, 2024
c4b3f60
Remove unnecessary block
jordimontana82 Aug 5, 2024
25f6b4d
Introduce dedicated exception for DynamicsValue/fake-xrm-easy#158
jordimontana82 Aug 7, 2024
f85ad17
Provides a workaround for DynamicsValue/fake-xrm-easy#158
jordimontana82 Aug 7, 2024
3598f04
Fix new line char
jordimontana82 Aug 7, 2024
e555c74
Adding more tests for DynamicsValue/fake-xrm-easy#158
jordimontana82 Aug 7, 2024
62a3005
Replace constructor by another one that exists across versions Dynami…
jordimontana82 Aug 7, 2024
4f226f0
Validate missing entity reference when trying to upload a file Dynami…
jordimontana82 Aug 7, 2024
ff7f54b
Added logic to also save a new FileAttachment record DynamicsValue/fa…
jordimontana82 Aug 8, 2024
214400e
Adds MaxFileSize validation for file uploads DynamicsValue/fake-xrm-e…
jordimontana82 Aug 8, 2024
0e8bbcd
Rearrange files and add InitializeDownload logic and tests DynamicsVa…
jordimontana82 Aug 9, 2024
69797a8
Update entity reference constructor for backward compatibility Dynami…
jordimontana82 Aug 9, 2024
5c6158b
Implements DownloadBlock logic DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 10, 2024
376c0ff
Review XML comments for exceptions DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 10, 2024
7c4b36f
Fix several code smells DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 10, 2024
3a74af8
Fix last code smell DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 10, 2024
8d5fb2a
Adds internal DeleteFile method DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 10, 2024
7be6fb0
Also set file attribute to null when deleting a file DynamicsValue/fa…
jordimontana82 Aug 10, 2024
fe3db51
Deletes a file when an update to the file attribute is set to null Dy…
jordimontana82 Aug 10, 2024
b195f5e
Implements blocked attachments and allowed and blocked mime types Dyn…
jordimontana82 Aug 15, 2024
6cd45ff
Adding Image upload/download tests DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 15, 2024
bbb932c
Adds basic support for InitializeFiles and several XML comments. Dyna…
jordimontana82 Aug 20, 2024
e51de98
Limit InitializeFiles to v9 DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 20, 2024
df0aa00
Deletes all associated files when a record is deleted DynamicsValue/f…
jordimontana82 Aug 20, 2024
0a5e2e9
Fix code smells
jordimontana82 Aug 20, 2024
90c023f
Replace Exception by custom Exception DynamicsValue/fake-xrm-easy#157
jordimontana82 Aug 20, 2024
c42d4da
Merge pull request #87 from DynamicsValue/feature/26-updates
jordimontana82 Aug 20, 2024
ba12f0e
Extend InternalsVisibleTo to be able to access new internal file stor…
jordimontana82 Aug 20, 2024
f6624d0
Merge pull request #88 from DynamicsValue/feature/26-updates
jordimontana82 Aug 20, 2024
706bdb4
Adds methods to retrieve one file by Id and a Queryable of files
jordimontana82 Aug 21, 2024
bade4dc
Merge pull request #89 from DynamicsValue/feature/26-updates
jordimontana82 Aug 21, 2024
45f9ae9
Add missing comments, updated typed entities with alternate key, upda…
jordimontana82 Sep 11, 2024
d8be9b6
Adding changes for DynamicsValue/fake-xrm-easy#160
jordimontana82 Sep 11, 2024
ab647e2
Comment out multi option sets for 365 package version. Update Changelog
jordimontana82 Sep 12, 2024
747380a
Adding missing configurations and update build scripts to due with du…
jordimontana82 Sep 12, 2024
dab32e7
Fix project paths
jordimontana82 Sep 12, 2024
3fec5d1
Fix configurations in solution file
jordimontana82 Sep 12, 2024
3ac4a64
Add conditional precomipaltion symbols to generated entities to exclu…
jordimontana82 Sep 12, 2024
c850a4e
Update namespace
jordimontana82 Sep 12, 2024
8642a64
Fix typo in pull request action
jordimontana82 Sep 12, 2024
4731e2c
Remove FakeXrmEasy.Integration to move it to a different repo. Commen…
jordimontana82 Sep 16, 2024
d4de596
Remove integration project from pack-src DynamicsValue/fake-xrm-easy#160
jordimontana82 Sep 18, 2024
57ccf1c
Merge pull request #90 from DynamicsValue/feature/26-updates
jordimontana82 Sep 18, 2024
8de9b55
Revisits and resolves a bunch of edge cases for Create, Upsert and Cr…
jordimontana82 Jan 12, 2025
0e9eb3a
Adds precompilation symbols for localized labels
jordimontana82 Jan 12, 2025
eee5807
Adds more precompilation symbols
jordimontana82 Jan 12, 2025
d9985af
Merge pull request #92 from DynamicsValue/feature/26-alternate-key
jordimontana82 Jan 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI-PullRequest-2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: dotnet nuget enable source github

- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFramework 'all'
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [2.6.0]

### Added

- Added new InMemoryFileDb implementation to support file and image storage - https://github.com/DynamicsValue/fake-xrm-easy/issues/157
- Added default max file size for file and image uploads - https://github.com/DynamicsValue/fake-xrm-easy/issues/157

### Changed

- Resolves many issues in Create, Upsert, and CreateMultiple and UpsertMultiple when alternate keys were used - https://github.com/DynamicsValue/fake-xrm-easy/issues/172
- TracingService will also output to the default standard output - https://github.com/DynamicsValue/fake-xrm-easy/issues/163
- **BREAKING CHANGE**: This will **only** affect you if you use XrmRealContext class. Moved XrmRealContext to a separate FakeXrmEasy.Integration package to remove dependency on XrmTooling - https://github.com/DynamicsValue/fake-xrm-easy/issues/160
- Resolves an issue in FetchXml queries when using arithmetic values and no early bound assemblies are used. It will now read from injected metadata in absence of proxy type assemblies - https://github.com/DynamicsValue/fake-xrm-easy/issues/158
- Resolves issue in MetadataGenerator where relationship properties were generated in the wrong order, also generates ManyToMany relationship properties - https://github.com/DynamicsValue/fake-xrm-easy/issues/135
- Adds implementation of RelatedEntities in Update message , before it was implemented only for Create - https://github.com/DynamicsValue/fake-xrm-easy/issues/154

## [2.5.1]

### Changed
Expand Down
8 changes: 4 additions & 4 deletions FakeXrmEasy.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataverseEntities", "tests\
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
FAKE_XRM_EASY_9|Any CPU = FAKE_XRM_EASY_9|Any CPU
FAKE_XRM_EASY_9|x64 = FAKE_XRM_EASY_9|x64
FAKE_XRM_EASY_9|x86 = FAKE_XRM_EASY_9|x86
FAKE_XRM_EASY_9|Any CPU = FAKE_XRM_EASY_9|Any CPU
FAKE_XRM_EASY_9|x64 = FAKE_XRM_EASY_9|x64
FAKE_XRM_EASY_9|x86 = FAKE_XRM_EASY_9|x86
FAKE_XRM_EASY_2013|Any CPU = FAKE_XRM_EASY_2013|Any CPU
FAKE_XRM_EASY_2013|x64 = FAKE_XRM_EASY_2013|x64
FAKE_XRM_EASY_2013|x86 = FAKE_XRM_EASY_2013|x86
Expand All @@ -46,7 +46,7 @@ Global
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x64.ActiveCfg = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x64.Build.0 = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x86.ActiveCfg = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|Any CPU.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|Any CPU.Build.0 = FAKE_XRM_EASY_2013|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|x64.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU
Expand Down
8 changes: 4 additions & 4 deletions pack-configuration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ if($targetFrameworks -eq "all")
{
if($versionSuffix -eq "")
{
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -o $tempNupkgFolder $projectPath/$projectName.csproj
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -o $tempNupkgFolder $projectPath/$projectName.csproj
}
else {
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
}
}
else
{
if($versionSuffix -eq "")
{
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj
}
else {
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
}
}

Expand Down
29 changes: 29 additions & 0 deletions pack-src-project.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
param (
[string]$versionSuffix = "",
[string]$targetFrameworks = "netcoreapp3.1",
[string]$packageIdPrefix = "",
[string]$projectName = "",
[string]$projectPath = ""
)

Write-Host "Running with versionSuffix '$($versionSuffix)'..."

$tempNupkgFolder = './nupkgs'

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}

Write-Host "Pack Succeeded :)" -ForegroundColor Green
14 changes: 1 addition & 13 deletions pack-src.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ $projectPath = "src/FakeXrmEasy.Core"

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}
./pack-src-project.ps1 -targetFrameworks $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix

Write-Host "Pack Succeeded :)" -ForegroundColor Green
29 changes: 29 additions & 0 deletions pack-tests-project.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
param (
[string]$versionSuffix = "",
[string]$targetFrameworks = "netcoreapp3.1",
[string]$packageIdPrefix = "",
[string]$projectName = "",
[string]$projectPath = ""
)

Write-Host "Running with versionSuffix '$($versionSuffix)'..."

$tempNupkgFolder = './nupkgs'

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}

Write-Host "Pack Succeeded :)" -ForegroundColor Green
14 changes: 1 addition & 13 deletions pack-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ $projectPath = "tests/FakeXrmEasy.Core.Tests"

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}
./pack-tests-project.ps1 -targetFrameworks $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix

Write-Host "Pack Succeeded :)" -ForegroundColor Green
2 changes: 1 addition & 1 deletion push.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param (
[string]$packageSource = "local-packages",
[string]$packagePrefix = "FakeXrmEasy.Abstractions"
[string]$packagePrefix = "FakeXrmEasy.Core"
)

Write-Host "Running with packageSource '$($packageSource)'..."
Expand Down
22 changes: 20 additions & 2 deletions src/FakeXrmEasy.Core/Db/InMemoryDb.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FakeXrmEasy.Core.Db.Exceptions;
using System;
using FakeXrmEasy.Core.Db.Exceptions;
using FakeXrmEasy.Extensions;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
Expand Down Expand Up @@ -105,13 +106,30 @@ protected internal void AddOrUpdateMetadata(string logicalName, EntityMetadata e

protected internal void AddEntityRecord(Entity e)
{
InMemoryTable table;
if (!ContainsTable(e.LogicalName))
{
InMemoryTable table;
AddTable(e.LogicalName, out table);
}
else
{
table = GetTable(e.LogicalName);
}

table.Add(e);
}

protected internal bool ContainsEntityRecord(string logicalName, Guid id)
{
if (!ContainsTable(logicalName))
{
return false;
}

var table = GetTable(logicalName);
return table.Contains(id);
}

protected internal void AddOrReplaceEntityRecord(Entity e)
{
InMemoryTable table = null;
Expand Down
61 changes: 61 additions & 0 deletions src/FakeXrmEasy.Core/Db/InMemoryTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Collections.Generic;
using System.Linq;
using FakeXrmEasy.Abstractions;

namespace FakeXrmEasy.Core.Db
{
Expand Down Expand Up @@ -107,6 +109,8 @@
return _rows[key];
}



/// <summary>
/// Returns an IEnumerable of all rows in the current table
/// </summary>
Expand All @@ -126,5 +130,62 @@
{
_metadata._entityMetadata = entityMetadata.Copy();
}

/// <summary>
/// Returns the entity metadata associated to this column
/// </summary>
/// <returns></returns>
protected internal EntityMetadata GetEntityMetadata()
{
return _metadata._entityMetadata;
}

#if !FAKE_XRM_EASY && !FAKE_XRM_EASY_2013
/// <summary>
/// Checks if there is a matching record that matches the alternate key provided.
/// </summary>
/// <param name="key">The metadata of the Alternate Key</param>

Check warning on line 147 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2015)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 147 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2016)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 147 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 147 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 147 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_9)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 147 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / pack-push

XML comment has a param tag for 'key', but there is no parameter by that name
/// <param name="key">The key values</param>

Check warning on line 148 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2015)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 148 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2016)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 148 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 148 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 148 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_9)

XML comment has a param tag for 'key', but there is no parameter by that name

Check warning on line 148 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / pack-push

XML comment has a param tag for 'key', but there is no parameter by that name
/// <returns></returns>
protected internal Entity GetByKeyAttributeCollection(KeyAttributeCollection keyAttributeValues)

Check warning on line 150 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2015)

Parameter 'keyAttributeValues' has no matching param tag in the XML comment for 'InMemoryTable.GetByKeyAttributeCollection(KeyAttributeCollection)' (but other parameters do)

Check warning on line 150 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2016)

Parameter 'keyAttributeValues' has no matching param tag in the XML comment for 'InMemoryTable.GetByKeyAttributeCollection(KeyAttributeCollection)' (but other parameters do)

Check warning on line 150 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

Parameter 'keyAttributeValues' has no matching param tag in the XML comment for 'InMemoryTable.GetByKeyAttributeCollection(KeyAttributeCollection)' (but other parameters do)

Check warning on line 150 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

Parameter 'keyAttributeValues' has no matching param tag in the XML comment for 'InMemoryTable.GetByKeyAttributeCollection(KeyAttributeCollection)' (but other parameters do)

Check warning on line 150 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_9)

Parameter 'keyAttributeValues' has no matching param tag in the XML comment for 'InMemoryTable.GetByKeyAttributeCollection(KeyAttributeCollection)' (but other parameters do)

Check warning on line 150 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / pack-push

Parameter 'keyAttributeValues' has no matching param tag in the XML comment for 'InMemoryTable.GetByKeyAttributeCollection(KeyAttributeCollection)' (but other parameters do)
{
return Rows.FirstOrDefault(row => keyAttributeValues.All(k => row.Attributes.ContainsKey(k.Key) && row.Attributes[k.Key] != null && row.Attributes[k.Key].Equals(k.Value)));
}


/// <summary>
/// Checks if the record exists using any of the alternate keys currently present in metadata, and if so, returns the matched key metadata
/// </summary>
/// <param name="record">The record whose attribute values will be used for searching</param>
/// <returns>The record that matches one of the entity key metadata, null if none found otherwise</returns>
protected internal Entity GetByAlternateKeys(Entity record, out EntityKeyMetadata matchedKeyMetadata)

Check warning on line 161 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2015)

Parameter 'matchedKeyMetadata' has no matching param tag in the XML comment for 'InMemoryTable.GetByAlternateKeys(Entity, out EntityKeyMetadata)' (but other parameters do)

Check warning on line 161 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2016)

Parameter 'matchedKeyMetadata' has no matching param tag in the XML comment for 'InMemoryTable.GetByAlternateKeys(Entity, out EntityKeyMetadata)' (but other parameters do)

Check warning on line 161 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

Parameter 'matchedKeyMetadata' has no matching param tag in the XML comment for 'InMemoryTable.GetByAlternateKeys(Entity, out EntityKeyMetadata)' (but other parameters do)

Check warning on line 161 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

Parameter 'matchedKeyMetadata' has no matching param tag in the XML comment for 'InMemoryTable.GetByAlternateKeys(Entity, out EntityKeyMetadata)' (but other parameters do)

Check warning on line 161 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_9)

Parameter 'matchedKeyMetadata' has no matching param tag in the XML comment for 'InMemoryTable.GetByAlternateKeys(Entity, out EntityKeyMetadata)' (but other parameters do)

Check warning on line 161 in src/FakeXrmEasy.Core/Db/InMemoryTable.cs

View workflow job for this annotation

GitHub Actions / pack-push

Parameter 'matchedKeyMetadata' has no matching param tag in the XML comment for 'InMemoryTable.GetByAlternateKeys(Entity, out EntityKeyMetadata)' (but other parameters do)
{
matchedKeyMetadata = null;
var entityMetadata = _metadata._entityMetadata;

var keyMetadata = entityMetadata?.Keys;
if (keyMetadata == null)
{
return null;
}

foreach (var key in keyMetadata)
{
var keyAttributes = record.ToAlternateKeyAttributeCollection(key);
if (keyAttributes != null)
{
var matchedRecord = GetByKeyAttributeCollection(keyAttributes);
if (matchedRecord != null)
{
matchedKeyMetadata = key;
return matchedRecord.Clone();
}
}
}

return null;
}
#endif

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;

namespace FakeXrmEasy.Core.Exceptions.Query.FetchXml
{
/// <summary>
/// Exception raised in a query when an attribute value type could not be determined correctly
/// </summary>
public class ArithmeticTypeConversionException: Exception
{
/// <summary>
/// Default constructor
/// </summary>
/// <param name="entityName"></param>
/// <param name="attributeName"></param>
internal ArithmeticTypeConversionException(string entityName, string attributeName) :
base($"When using arithmetic values in a condition of attribute '{attributeName}' of entity '{entityName}' in a Fetch a ProxyTypesAssembly must be used in order to know which types to cast values to. If you are using early bound types, please make sure the early bound type was generated for entity '{entityName}'")
{

}
}
}
Loading
Loading