diff --git a/.gitignore b/.gitignore
index 3d70d1068..336afb2a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -220,3 +220,4 @@ FakesAssemblies/
/SPMeta2.v2.ncrunchsolution
/SPMeta2/SPMeta2.Standard/SPMeta2.Standard.csproj.DotSettings
/SPMeta2/SPMeta2/SPMeta2.csproj.DotSettings
+/SPMeta2/SubPointSolutions.Docs/Views-Output
diff --git a/README.md b/README.md
index 75c68a56a..ad9841188 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,12 @@ The most comprehensive, enterprise-ready framework for provisioning SharePoint a
* Documented: API samples, guidances and documentation
* Enterprise ready: regression tests, localization, SLA
-### Build status
-[![Build status](https://ci.appveyor.com/api/projects/status/0ym3fts7hmrdjvy1?svg=true)](https://ci.appveyor.com/project/SubPointSupport/spmeta2)
+### Build status
+| Branch | Status |
+| ------------- | ------------- |
+| dev | [![Build status](https://ci.appveyor.com/api/projects/status/0ym3fts7hmrdjvy1/branch/dev?svg=true)](https://ci.appveyor.com/project/SubPointSupport/spmeta2/branch/dev) |
+| beta | [![Build status](https://ci.appveyor.com/api/projects/status/0ym3fts7hmrdjvy1/branch/beta?svg=true)](https://ci.appveyor.com/project/SubPointSupport/spmeta2/branch/beta) |
+| master| [![Build status](https://ci.appveyor.com/api/projects/status/0ym3fts7hmrdjvy1/branch/master?svg=true)](https://ci.appveyor.com/project/SubPointSupport/spmeta2/branch/master) |
### SPMeta2 in details
diff --git a/SPMeta2.sln b/SPMeta2.sln
index 8f30130db..24c200434 100644
--- a/SPMeta2.sln
+++ b/SPMeta2.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
+VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Provision", "Provision", "{8A0307D3-5564-4034-9DB1-D13FEE1DADD9}"
EndProject
@@ -16,6 +16,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_3rd party", "_3rd party", "{EE9BD842-2CA9-45B2-AB7C-A8EB0353AAB7}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
+ appveyor-v12.yml = appveyor-v12.yml
appveyor.yml = appveyor.yml
README.md = README.md
SPMeta2.snk = SPMeta2.snk
@@ -112,264 +113,145 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubPointSolutions.Docs", "S
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build", "SPMeta2\Build\Build.csproj", "{B9AD05BB-B576-46B8-89A0-FBC70C438B64}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Provision.Nintex", "Provision.Nintex", "{543E02CC-AA4A-4B1F-ABBD-2C88CFAA463C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPMeta2.Nintex", "SPMeta2\SPMeta2.Nintex\SPMeta2.Nintex.csproj", "{D19B0907-CED5-416A-9D45-0F112990C234}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPMeta2.Nintex.CSOM", "SPMeta2\SPMeta2.Nintex.CSOM\SPMeta2.Nintex.CSOM.csproj", "{588FC30F-1C85-410E-AB20-C9741DB28857}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPMeta2.Nintex.SSOM", "SPMeta2\SPMeta2.Nintex.SSOM\SPMeta2.Nintex.SSOM.csproj", "{788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- CI-CSOM2013|Any CPU = CI-CSOM2013|Any CPU
- CI-O365|Any CPU = CI-O365|Any CPU
Debug|Any CPU = Debug|Any CPU
Debug40|Any CPU = Debug40|Any CPU
Debug45|Any CPU = Debug45|Any CPU
- Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A3A48F9F-1424-41CD-BF92-49D509C715CE}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {A3A48F9F-1424-41CD-BF92-49D509C715CE}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
{A3A48F9F-1424-41CD-BF92-49D509C715CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3A48F9F-1424-41CD-BF92-49D509C715CE}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{A3A48F9F-1424-41CD-BF92-49D509C715CE}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{A3A48F9F-1424-41CD-BF92-49D509C715CE}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{A3A48F9F-1424-41CD-BF92-49D509C715CE}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {A3A48F9F-1424-41CD-BF92-49D509C715CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A3A48F9F-1424-41CD-BF92-49D509C715CE}.Release|Any CPU.Build.0 = Release|Any CPU
- {EE49D3FD-6180-40E6-829F-6831FF89DAC6}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {EE49D3FD-6180-40E6-829F-6831FF89DAC6}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {EE49D3FD-6180-40E6-829F-6831FF89DAC6}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {EE49D3FD-6180-40E6-829F-6831FF89DAC6}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Release|Any CPU.ActiveCfg = Debug35|Any CPU
- {EE49D3FD-6180-40E6-829F-6831FF89DAC6}.Release|Any CPU.Build.0 = Debug35|Any CPU
- {6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.CI-CSOM2013|Any CPU.ActiveCfg = Debug35|Any CPU
- {6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.CI-CSOM2013|Any CPU.Build.0 = Debug35|Any CPU
- {6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.CI-O365|Any CPU.ActiveCfg = Debug35|Any CPU
- {6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.CI-O365|Any CPU.Build.0 = Debug35|Any CPU
{6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Release|Any CPU.ActiveCfg = Debug|Any CPU
- {6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}.Release|Any CPU.Build.0 = Debug|Any CPU
- {5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.CI-O365|Any CPU.ActiveCfg = CI-O365|Any CPU
- {5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.CI-O365|Any CPU.Build.0 = CI-O365|Any CPU
{5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}.Release|Any CPU.Build.0 = Release|Any CPU
- {4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4C4A0044-FBE1-46D8-B8DB-EB579831CDB6}.Release|Any CPU.Build.0 = Release|Any CPU
- {FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Release|Any CPU.ActiveCfg = Debug35|Any CPU
- {FBD78AC1-B766-4332-A9B1-C73EE64FD5C6}.Release|Any CPU.Build.0 = Debug35|Any CPU
- {2DA71A5B-C039-4A2E-9985-91D6501F293C}.CI-CSOM2013|Any CPU.ActiveCfg = CI-CSOM2013|Any CPU
- {2DA71A5B-C039-4A2E-9985-91D6501F293C}.CI-CSOM2013|Any CPU.Build.0 = CI-CSOM2013|Any CPU
- {2DA71A5B-C039-4A2E-9985-91D6501F293C}.CI-O365|Any CPU.ActiveCfg = CI-O365|Any CPU
- {2DA71A5B-C039-4A2E-9985-91D6501F293C}.CI-O365|Any CPU.Build.0 = CI-O365|Any CPU
{2DA71A5B-C039-4A2E-9985-91D6501F293C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DA71A5B-C039-4A2E-9985-91D6501F293C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DA71A5B-C039-4A2E-9985-91D6501F293C}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{2DA71A5B-C039-4A2E-9985-91D6501F293C}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{2DA71A5B-C039-4A2E-9985-91D6501F293C}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{2DA71A5B-C039-4A2E-9985-91D6501F293C}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {2DA71A5B-C039-4A2E-9985-91D6501F293C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2DA71A5B-C039-4A2E-9985-91D6501F293C}.Release|Any CPU.Build.0 = Release|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.CI-O365|Any CPU.ActiveCfg = CI-O365|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.CI-O365|Any CPU.Build.0 = CI-O365|Any CPU
{5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
+ {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug40|Any CPU.ActiveCfg = Debug45|Any CPU
+ {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug40|Any CPU.Build.0 = Debug45|Any CPU
{5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}.Release|Any CPU.Build.0 = Release|Any CPU
- {00E1581F-31D9-493E-AD16-C188AE966458}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {00E1581F-31D9-493E-AD16-C188AE966458}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {00E1581F-31D9-493E-AD16-C188AE966458}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {00E1581F-31D9-493E-AD16-C188AE966458}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{00E1581F-31D9-493E-AD16-C188AE966458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00E1581F-31D9-493E-AD16-C188AE966458}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00E1581F-31D9-493E-AD16-C188AE966458}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{00E1581F-31D9-493E-AD16-C188AE966458}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{00E1581F-31D9-493E-AD16-C188AE966458}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{00E1581F-31D9-493E-AD16-C188AE966458}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {00E1581F-31D9-493E-AD16-C188AE966458}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {00E1581F-31D9-493E-AD16-C188AE966458}.Release|Any CPU.Build.0 = Release|Any CPU
- {7D095A0D-0BDE-446D-8093-13E5685F1D3C}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {7D095A0D-0BDE-446D-8093-13E5685F1D3C}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {7D095A0D-0BDE-446D-8093-13E5685F1D3C}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {7D095A0D-0BDE-446D-8093-13E5685F1D3C}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Release|Any CPU.ActiveCfg = Debug35|Any CPU
- {7D095A0D-0BDE-446D-8093-13E5685F1D3C}.Release|Any CPU.Build.0 = Debug35|Any CPU
- {D81AE83A-BEEF-4099-B354-0B88D7396B25}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {D81AE83A-BEEF-4099-B354-0B88D7396B25}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {D81AE83A-BEEF-4099-B354-0B88D7396B25}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {D81AE83A-BEEF-4099-B354-0B88D7396B25}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{D81AE83A-BEEF-4099-B354-0B88D7396B25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D81AE83A-BEEF-4099-B354-0B88D7396B25}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D81AE83A-BEEF-4099-B354-0B88D7396B25}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{D81AE83A-BEEF-4099-B354-0B88D7396B25}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{D81AE83A-BEEF-4099-B354-0B88D7396B25}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{D81AE83A-BEEF-4099-B354-0B88D7396B25}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {D81AE83A-BEEF-4099-B354-0B88D7396B25}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D81AE83A-BEEF-4099-B354-0B88D7396B25}.Release|Any CPU.Build.0 = Release|Any CPU
- {33B40E92-C649-41FC-B774-53D259801B3B}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {33B40E92-C649-41FC-B774-53D259801B3B}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {33B40E92-C649-41FC-B774-53D259801B3B}.CI-O365|Any CPU.ActiveCfg = CI-O365|Any CPU
- {33B40E92-C649-41FC-B774-53D259801B3B}.CI-O365|Any CPU.Build.0 = CI-O365|Any CPU
{33B40E92-C649-41FC-B774-53D259801B3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33B40E92-C649-41FC-B774-53D259801B3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33B40E92-C649-41FC-B774-53D259801B3B}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{33B40E92-C649-41FC-B774-53D259801B3B}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{33B40E92-C649-41FC-B774-53D259801B3B}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{33B40E92-C649-41FC-B774-53D259801B3B}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {33B40E92-C649-41FC-B774-53D259801B3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {33B40E92-C649-41FC-B774-53D259801B3B}.Release|Any CPU.Build.0 = Release|Any CPU
- {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}.Release|Any CPU.Build.0 = Release|Any CPU
- {5793019F-7514-4B1F-B31D-A5E472FD034D}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {5793019F-7514-4B1F-B31D-A5E472FD034D}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {5793019F-7514-4B1F-B31D-A5E472FD034D}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {5793019F-7514-4B1F-B31D-A5E472FD034D}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{5793019F-7514-4B1F-B31D-A5E472FD034D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5793019F-7514-4B1F-B31D-A5E472FD034D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5793019F-7514-4B1F-B31D-A5E472FD034D}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{5793019F-7514-4B1F-B31D-A5E472FD034D}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{5793019F-7514-4B1F-B31D-A5E472FD034D}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{5793019F-7514-4B1F-B31D-A5E472FD034D}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {5793019F-7514-4B1F-B31D-A5E472FD034D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5793019F-7514-4B1F-B31D-A5E472FD034D}.Release|Any CPU.Build.0 = Release|Any CPU
- {F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F310878E-9B72-4C3C-AE5D-C60B3515E2FC}.Release|Any CPU.Build.0 = Release|Any CPU
- {2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.CI-O365|Any CPU.ActiveCfg = CI-O365|Any CPU
- {2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.CI-O365|Any CPU.Build.0 = CI-O365|Any CPU
{2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2A8F08ED-E837-4E91-8E49-B5F30CF9EEF3}.Release|Any CPU.Build.0 = Release|Any CPU
- {8B199151-24BC-4C32-B69F-7371B37F33D4}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {8B199151-24BC-4C32-B69F-7371B37F33D4}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {8B199151-24BC-4C32-B69F-7371B37F33D4}.CI-O365|Any CPU.ActiveCfg = CI-O365|Any CPU
- {8B199151-24BC-4C32-B69F-7371B37F33D4}.CI-O365|Any CPU.Build.0 = CI-O365|Any CPU
{8B199151-24BC-4C32-B69F-7371B37F33D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B199151-24BC-4C32-B69F-7371B37F33D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B199151-24BC-4C32-B69F-7371B37F33D4}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{8B199151-24BC-4C32-B69F-7371B37F33D4}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{8B199151-24BC-4C32-B69F-7371B37F33D4}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{8B199151-24BC-4C32-B69F-7371B37F33D4}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {8B199151-24BC-4C32-B69F-7371B37F33D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8B199151-24BC-4C32-B69F-7371B37F33D4}.Release|Any CPU.Build.0 = Release|Any CPU
- {04EF5903-B379-4404-8DBC-B21ABE0D1099}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {04EF5903-B379-4404-8DBC-B21ABE0D1099}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {04EF5903-B379-4404-8DBC-B21ABE0D1099}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {04EF5903-B379-4404-8DBC-B21ABE0D1099}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{04EF5903-B379-4404-8DBC-B21ABE0D1099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04EF5903-B379-4404-8DBC-B21ABE0D1099}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04EF5903-B379-4404-8DBC-B21ABE0D1099}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{04EF5903-B379-4404-8DBC-B21ABE0D1099}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{04EF5903-B379-4404-8DBC-B21ABE0D1099}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{04EF5903-B379-4404-8DBC-B21ABE0D1099}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {04EF5903-B379-4404-8DBC-B21ABE0D1099}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {04EF5903-B379-4404-8DBC-B21ABE0D1099}.Release|Any CPU.Build.0 = Release|Any CPU
- {E9274D1F-BF08-44CB-9162-35110379D5C0}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {E9274D1F-BF08-44CB-9162-35110379D5C0}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {E9274D1F-BF08-44CB-9162-35110379D5C0}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {E9274D1F-BF08-44CB-9162-35110379D5C0}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{E9274D1F-BF08-44CB-9162-35110379D5C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9274D1F-BF08-44CB-9162-35110379D5C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9274D1F-BF08-44CB-9162-35110379D5C0}.Debug40|Any CPU.ActiveCfg = Debug40|Any CPU
{E9274D1F-BF08-44CB-9162-35110379D5C0}.Debug40|Any CPU.Build.0 = Debug40|Any CPU
{E9274D1F-BF08-44CB-9162-35110379D5C0}.Debug45|Any CPU.ActiveCfg = Debug45|Any CPU
{E9274D1F-BF08-44CB-9162-35110379D5C0}.Debug45|Any CPU.Build.0 = Debug45|Any CPU
- {E9274D1F-BF08-44CB-9162-35110379D5C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E9274D1F-BF08-44CB-9162-35110379D5C0}.Release|Any CPU.Build.0 = Release|Any CPU
- {7B84193A-251E-47F1-BDD0-EDD85918D307}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {7B84193A-251E-47F1-BDD0-EDD85918D307}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
{7B84193A-251E-47F1-BDD0-EDD85918D307}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B84193A-251E-47F1-BDD0-EDD85918D307}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{7B84193A-251E-47F1-BDD0-EDD85918D307}.Debug40|Any CPU.Build.0 = Debug|Any CPU
{7B84193A-251E-47F1-BDD0-EDD85918D307}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{7B84193A-251E-47F1-BDD0-EDD85918D307}.Debug45|Any CPU.Build.0 = Debug|Any CPU
- {7B84193A-251E-47F1-BDD0-EDD85918D307}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7B84193A-251E-47F1-BDD0-EDD85918D307}.Release|Any CPU.Build.0 = Release|Any CPU
- {B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Debug40|Any CPU.Build.0 = Debug|Any CPU
{B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Debug45|Any CPU.Build.0 = Debug|Any CPU
- {B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B556A178-DA0A-4DA0-AF92-2D2504FBCDA9}.Release|Any CPU.Build.0 = Release|Any CPU
- {A88390A8-20F2-4247-A9C3-28480FEAEFA6}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {A88390A8-20F2-4247-A9C3-28480FEAEFA6}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
{A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Debug40|Any CPU.Build.0 = Debug|Any CPU
@@ -377,11 +259,6 @@ Global
{A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Debug45|Any CPU.Build.0 = Debug|Any CPU
{A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Debug45|Any CPU.Deploy.0 = Debug|Any CPU
- {A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Release|Any CPU.Build.0 = Release|Any CPU
- {A88390A8-20F2-4247-A9C3-28480FEAEFA6}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {16A7F927-A570-4EB0-90E6-887E676AF42B}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {16A7F927-A570-4EB0-90E6-887E676AF42B}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
{16A7F927-A570-4EB0-90E6-887E676AF42B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16A7F927-A570-4EB0-90E6-887E676AF42B}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{16A7F927-A570-4EB0-90E6-887E676AF42B}.Debug40|Any CPU.Build.0 = Debug|Any CPU
@@ -389,20 +266,11 @@ Global
{16A7F927-A570-4EB0-90E6-887E676AF42B}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{16A7F927-A570-4EB0-90E6-887E676AF42B}.Debug45|Any CPU.Build.0 = Debug|Any CPU
{16A7F927-A570-4EB0-90E6-887E676AF42B}.Debug45|Any CPU.Deploy.0 = Debug|Any CPU
- {16A7F927-A570-4EB0-90E6-887E676AF42B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {16A7F927-A570-4EB0-90E6-887E676AF42B}.Release|Any CPU.Build.0 = Release|Any CPU
- {16A7F927-A570-4EB0-90E6-887E676AF42B}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {16E57ADA-0D73-429E-96F7-87EAA03128D9}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {16E57ADA-0D73-429E-96F7-87EAA03128D9}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
{16E57ADA-0D73-429E-96F7-87EAA03128D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16E57ADA-0D73-429E-96F7-87EAA03128D9}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{16E57ADA-0D73-429E-96F7-87EAA03128D9}.Debug40|Any CPU.Build.0 = Debug|Any CPU
{16E57ADA-0D73-429E-96F7-87EAA03128D9}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{16E57ADA-0D73-429E-96F7-87EAA03128D9}.Debug45|Any CPU.Build.0 = Debug|Any CPU
- {16E57ADA-0D73-429E-96F7-87EAA03128D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {16E57ADA-0D73-429E-96F7-87EAA03128D9}.Release|Any CPU.Build.0 = Release|Any CPU
- {2A290D6E-6AF3-4D17-975D-3C393700A0B1}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {2A290D6E-6AF3-4D17-975D-3C393700A0B1}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
{2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Debug40|Any CPU.Build.0 = Debug|Any CPU
@@ -410,44 +278,40 @@ Global
{2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Debug45|Any CPU.Build.0 = Debug|Any CPU
{2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Debug45|Any CPU.Deploy.0 = Debug|Any CPU
- {2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Release|Any CPU.Build.0 = Release|Any CPU
- {2A290D6E-6AF3-4D17-975D-3C393700A0B1}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.CI-CSOM2013|Any CPU.ActiveCfg = Debug|Any CPU
- {0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.CI-CSOM2013|Any CPU.Build.0 = Debug|Any CPU
- {0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.CI-O365|Any CPU.ActiveCfg = Debug|Any CPU
- {0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.CI-O365|Any CPU.Build.0 = Debug|Any CPU
{0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Debug40|Any CPU.Build.0 = Debug|Any CPU
{0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Debug45|Any CPU.Build.0 = Debug|Any CPU
- {0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0DE538C9-1723-46B1-90F8-5DC67C56D7DD}.Release|Any CPU.Build.0 = Release|Any CPU
- {B30F6CA8-3E96-4734-B6B1-A61F201099E4}.CI-CSOM2013|Any CPU.ActiveCfg = Release|Any CPU
- {B30F6CA8-3E96-4734-B6B1-A61F201099E4}.CI-CSOM2013|Any CPU.Build.0 = Release|Any CPU
- {B30F6CA8-3E96-4734-B6B1-A61F201099E4}.CI-O365|Any CPU.ActiveCfg = Release|Any CPU
- {B30F6CA8-3E96-4734-B6B1-A61F201099E4}.CI-O365|Any CPU.Build.0 = Release|Any CPU
{B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Debug40|Any CPU.Build.0 = Debug|Any CPU
{B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Debug45|Any CPU.Build.0 = Debug|Any CPU
- {B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B30F6CA8-3E96-4734-B6B1-A61F201099E4}.Release|Any CPU.Build.0 = Release|Any CPU
- {B9AD05BB-B576-46B8-89A0-FBC70C438B64}.CI-CSOM2013|Any CPU.ActiveCfg = Release|Any CPU
- {B9AD05BB-B576-46B8-89A0-FBC70C438B64}.CI-CSOM2013|Any CPU.Build.0 = Release|Any CPU
- {B9AD05BB-B576-46B8-89A0-FBC70C438B64}.CI-O365|Any CPU.ActiveCfg = Release|Any CPU
- {B9AD05BB-B576-46B8-89A0-FBC70C438B64}.CI-O365|Any CPU.Build.0 = Release|Any CPU
{B9AD05BB-B576-46B8-89A0-FBC70C438B64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9AD05BB-B576-46B8-89A0-FBC70C438B64}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
{B9AD05BB-B576-46B8-89A0-FBC70C438B64}.Debug40|Any CPU.Build.0 = Debug|Any CPU
{B9AD05BB-B576-46B8-89A0-FBC70C438B64}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
{B9AD05BB-B576-46B8-89A0-FBC70C438B64}.Debug45|Any CPU.Build.0 = Debug|Any CPU
- {B9AD05BB-B576-46B8-89A0-FBC70C438B64}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B9AD05BB-B576-46B8-89A0-FBC70C438B64}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D19B0907-CED5-416A-9D45-0F112990C234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D19B0907-CED5-416A-9D45-0F112990C234}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D19B0907-CED5-416A-9D45-0F112990C234}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
+ {D19B0907-CED5-416A-9D45-0F112990C234}.Debug40|Any CPU.Build.0 = Debug|Any CPU
+ {D19B0907-CED5-416A-9D45-0F112990C234}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
+ {D19B0907-CED5-416A-9D45-0F112990C234}.Debug45|Any CPU.Build.0 = Debug|Any CPU
+ {588FC30F-1C85-410E-AB20-C9741DB28857}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {588FC30F-1C85-410E-AB20-C9741DB28857}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {588FC30F-1C85-410E-AB20-C9741DB28857}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
+ {588FC30F-1C85-410E-AB20-C9741DB28857}.Debug40|Any CPU.Build.0 = Debug|Any CPU
+ {588FC30F-1C85-410E-AB20-C9741DB28857}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
+ {588FC30F-1C85-410E-AB20-C9741DB28857}.Debug45|Any CPU.Build.0 = Debug|Any CPU
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}.Debug40|Any CPU.Build.0 = Debug|Any CPU
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}.Debug45|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -490,5 +354,8 @@ Global
{0DE538C9-1723-46B1-90F8-5DC67C56D7DD} = {AA39B47D-287D-4DAC-A1B6-CBEE826B0D83}
{B30F6CA8-3E96-4734-B6B1-A61F201099E4} = {7DCBDB97-13FC-4A07-B49C-2300D2FBCF8D}
{B9AD05BB-B576-46B8-89A0-FBC70C438B64} = {EE9BD842-2CA9-45B2-AB7C-A8EB0353AAB7}
+ {D19B0907-CED5-416A-9D45-0F112990C234} = {543E02CC-AA4A-4B1F-ABBD-2C88CFAA463C}
+ {588FC30F-1C85-410E-AB20-C9741DB28857} = {543E02CC-AA4A-4B1F-ABBD-2C88CFAA463C}
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3} = {543E02CC-AA4A-4B1F-ABBD-2C88CFAA463C}
EndGlobalSection
EndGlobal
diff --git a/SPMeta2/Build/Build.csproj b/SPMeta2/Build/Build.csproj
index 3832822e4..35cf0f3e5 100644
--- a/SPMeta2/Build/Build.csproj
+++ b/SPMeta2/Build/Build.csproj
@@ -42,8 +42,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
bin\Debug35-$(spRuntime)\
v3.5
true
@@ -41,15 +30,7 @@
false
bin\Debug35-$(spRuntime)\SPMeta2.CSOM.Standard.XML
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
+
bin\Debug40-$(spRuntime)\
v4.0
true
@@ -60,8 +41,9 @@
4
false
bin\Debug40-$(spRuntime)\SPMeta2.CSOM.Standard.XML
+
-
+
bin\Debug45-$(spRuntime)\
v4.5
true
@@ -73,59 +55,32 @@
false
bin\Debug45-$(spRuntime)\SPMeta2.CSOM.Standard.XML
-
- true
-
-
- SPMeta2.snk
-
-
- bin\Debug40-$(spRuntime)\
-
-
+
+
+
+ bin\Debug\
+ v4.5
true
- bin\Debug45-$(spRuntime)\
- DEBUG;TRACE
- bin\Debug45-$(spRuntime)\SPMeta2.CSOM.Standard.XML
full
- AnyCPU
+ false
+ TRACE;DEBUG
prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\CI-O365\
- DEBUG;TRACE
+ 4
+ false
bin\Debug\SPMeta2.CSOM.Standard.XML
- true
- 1591
- full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
- true
- bin\CI-CSOM2013\
- DEBUG;TRACE
- bin\Debug\SPMeta2.CSOM.Standard.XML
- true
- 1591
- full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
+
+ true
+
+
+ SPMeta2.snk
True
..\SPMeta2.Dependencies\SharePoint\SP2010 - 14.0.4762.1000\CSOM\Microsoft.SharePoint.Client.dll
False
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.DocumentManagement.dll
-
+
True
..\SPMeta2.Dependencies\SharePoint\SP2010 - 14.0.4762.1000\CSOM\Microsoft.SharePoint.Client.Runtime.dll
@@ -160,6 +115,11 @@
..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.WorkflowServices.dll
False
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.DocumentManagement.dll
+ False
+
True
..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.dll
@@ -189,6 +149,11 @@
True
..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.WorkflowServices.dll
False
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.DocumentManagement.dll
+ False
True
@@ -222,6 +187,10 @@
True
..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Taxonomy.dll
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.DocumentManagement.dll
+
True
..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.WorkflowServices.dll
@@ -254,6 +223,10 @@
True
..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.Taxonomy.dll
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.DocumentManagement.dll
+
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/CSOMModelHandlerBase.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/CSOMModelHandlerBase.cs
index 5d1e7a536..fc0635dd1 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/CSOMModelHandlerBase.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/CSOMModelHandlerBase.cs
@@ -1,117 +1,122 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Microsoft.SharePoint.Client;
-
-using SPMeta2.CSOM.Services;
-using SPMeta2.CSOM.Extensions;
-using SPMeta2.Definitions;
-using SPMeta2.Exceptions;
-using SPMeta2.ModelHandlers;
-using SPMeta2.Services;
-using SPMeta2.Utils;
-
-namespace SPMeta2.CSOM.ModelHandlers
-{
- public abstract class CSOMModelHandlerBase : ModelHandlerBase
- {
- #region constructors
-
- public CSOMModelHandlerBase()
- {
- TokenReplacementService = ServiceContainer.Instance.GetService();
- LocalizationService = ServiceContainer.Instance.GetService();
-
- // TODO, move to ServiceContainer
- ContentTypeLookupService = new CSOMContentTypeLookupService();
- FieldLookupService = new CSOMFieldLookupService();
- }
-
- #endregion
-
- #region properties
-
- public CSOMFieldLookupService FieldLookupService { get; set; }
- public CSOMContentTypeLookupService ContentTypeLookupService { get; set; }
- public TokenReplacementServiceBase TokenReplacementService { get; set; }
- public LocalizationServiceBase LocalizationService { get; set; }
-
- #endregion
-
- #region utils
-
- protected virtual object GetPropertyValue(object obj, string propName)
- {
- return ReflectionUtils.GetPropertyValue(obj, propName);
- }
-
- #endregion
-
- #region localization
-
- protected virtual void ProcessGenericLocalization(ClientObject obj, Dictionary> localizations)
- {
- var targetProps = localizations.Keys.ToList();
- var isSupportedRuntime = ReflectionUtils.HasProperties(obj, targetProps);
-
- if (!isSupportedRuntime)
- {
- TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
- string.Format("CSOM runtime doesn't have [{0}] methods support. Update CSOM runtime to a new version. Provision is skipped",
- string.Join(", ", targetProps.ToArray())));
-
- return;
- }
-
- var needsUpdate = false;
-
- foreach (var key in localizations.Keys)
- {
- var propName = key;
- var localization = localizations[key];
-
- if (localization.Any())
- {
- var userResource = GetPropertyValue(obj, propName);
-
- foreach (var locValue in localization)
- LocalizationService.ProcessUserResource(obj, userResource, locValue);
-
- needsUpdate = true;
- }
- }
-
- if (needsUpdate)
- {
- var updateMethod = ReflectionUtils.GetMethod(obj, "Update");
-
- if (updateMethod != null)
- {
- if (obj is ContentType)
- {
- updateMethod.Invoke(obj, new object[] { true });
- }
- else if (obj is Field)
- {
- updateMethod = ReflectionUtils.GetMethod(obj, "UpdateAndPushChanges");
- updateMethod.Invoke(obj, new object[] { true });
- }
- else
- {
- updateMethod.Invoke(obj, null);
- }
-
- obj.Context.ExecuteQueryWithTrace();
- }
- else
- {
- throw new SPMeta2Exception(String.Format("Can't find Update() methods on client object of type:[{0}]", obj.GetType()));
- }
- }
- }
-
- #endregion
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Microsoft.SharePoint.Client;
+
+using SPMeta2.CSOM.Services;
+using SPMeta2.CSOM.Extensions;
+using SPMeta2.Definitions;
+using SPMeta2.Exceptions;
+using SPMeta2.ModelHandlers;
+using SPMeta2.Services;
+using SPMeta2.Utils;
+using SPMeta2.CSOM.Services.Impl;
+
+namespace SPMeta2.CSOM.ModelHandlers
+{
+ public abstract class CSOMModelHandlerBase : ModelHandlerBase
+ {
+ #region constructors
+
+ public CSOMModelHandlerBase()
+ {
+ TokenReplacementService = ServiceContainer.Instance.GetService();
+ LocalizationService = ServiceContainer.Instance.GetService();
+
+ ClientRuntimeQueryService = ServiceContainer.Instance.GetService() ?? new DefaultClientRuntimeQueryService();
+
+ // TODO, move to ServiceContainer
+ ContentTypeLookupService = new CSOMContentTypeLookupService();
+ FieldLookupService = new CSOMFieldLookupService();
+ }
+
+ #endregion
+
+ #region properties
+
+ public CSOMFieldLookupService FieldLookupService { get; set; }
+ public CSOMContentTypeLookupService ContentTypeLookupService { get; set; }
+ public TokenReplacementServiceBase TokenReplacementService { get; set; }
+ public LocalizationServiceBase LocalizationService { get; set; }
+
+ public ClientRuntimeQueryServiceBase ClientRuntimeQueryService { get; set; }
+
+ #endregion
+
+ #region utils
+
+ protected virtual object GetPropertyValue(object obj, string propName)
+ {
+ return ReflectionUtils.GetPropertyValue(obj, propName);
+ }
+
+ #endregion
+
+ #region localization
+
+ protected virtual void ProcessGenericLocalization(ClientObject obj, Dictionary> localizations)
+ {
+ var targetProps = localizations.Keys.ToList();
+ var isSupportedRuntime = ReflectionUtils.HasProperties(obj, targetProps);
+
+ if (!isSupportedRuntime)
+ {
+ TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
+ string.Format("CSOM runtime doesn't have [{0}] methods support. Update CSOM runtime to a new version. Provision is skipped",
+ string.Join(", ", targetProps.ToArray())));
+
+ return;
+ }
+
+ var needsUpdate = false;
+
+ foreach (var key in localizations.Keys)
+ {
+ var propName = key;
+ var localization = localizations[key];
+
+ if (localization.Any())
+ {
+ var userResource = GetPropertyValue(obj, propName);
+
+ foreach (var locValue in localization)
+ LocalizationService.ProcessUserResource(obj, userResource, locValue);
+
+ needsUpdate = true;
+ }
+ }
+
+ if (needsUpdate)
+ {
+ var updateMethod = ReflectionUtils.GetMethod(obj, "Update");
+
+ if (updateMethod != null)
+ {
+ if (obj is ContentType)
+ {
+ updateMethod.Invoke(obj, new object[] { true });
+ }
+ else if (obj is Field)
+ {
+ updateMethod = ReflectionUtils.GetMethod(obj, "UpdateAndPushChanges");
+ updateMethod.Invoke(obj, new object[] { true });
+ }
+ else
+ {
+ updateMethod.Invoke(obj, null);
+ }
+
+ obj.Context.ExecuteQueryWithTrace();
+ }
+ else
+ {
+ throw new SPMeta2Exception(String.Format("Can't find Update() methods on client object of type:[{0}]", obj.GetType()));
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeFieldLinkModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeFieldLinkModelHandler.cs
index a51ae4f2c..8a64490d6 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeFieldLinkModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeFieldLinkModelHandler.cs
@@ -179,12 +179,7 @@ public override void DeployModel(object modelHost, DefinitionBase model)
if (ReflectionUtils.HasProperty(fieldLink, "DisplayName"))
{
if (!string.IsNullOrEmpty(contentTypeFieldLinkModel.DisplayName))
- {
- context.AddQuery(new ClientActionInvokeMethod(fieldLink, "DisplayName", new object[]
- {
- contentTypeFieldLinkModel.DisplayName
- }));
- }
+ ClientRuntimeQueryService.SetProperty(fieldLink, "DisplayName", contentTypeFieldLinkModel.DisplayName);
}
else
{
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs
index f68242070..03bc1550d 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs
@@ -312,7 +312,11 @@ protected virtual void ProcessFieldProperties(Field field, FieldDefinition defin
field.Indexed = definition.Indexed;
}
- field.JSLink = definition.JSLink;
+ // setting up JS link seems to crash fields provision in some cases
+ // Issue deploying fields to Site attached to Office 365 Group #945
+ // https://github.com/SubPointSolutions/spmeta2/issues/945
+ if (!string.IsNullOrEmpty(definition.JSLink))
+ field.JSLink = definition.JSLink;
#endif
#if !NET35
@@ -451,8 +455,10 @@ protected virtual void ProcessSPFieldXElement(XElement fieldTemplate, FieldDefin
fieldTemplate.SetAttribute(BuiltInFieldAttributes.StaticName, fieldModel.InternalName);
// additions
+#if !NET35
if (!String.IsNullOrEmpty(fieldModel.JSLink))
fieldTemplate.SetAttribute(BuiltInFieldAttributes.JSLink, fieldModel.JSLink);
+#endif
if (!string.IsNullOrEmpty(fieldModel.DefaultValue))
fieldTemplate.SetSubNode("Default", fieldModel.DefaultValue);
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListModelHandler.cs
index 4a1a6fd52..455980e34 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListModelHandler.cs
@@ -468,7 +468,7 @@ private void MapListProperties(object modelHost, List list, ListDefinition defin
{
if (ReflectionUtils.HasProperty(list, "MajorVersionLimit"))
{
- context.AddQuery(new ClientActionSetProperty(list, "MajorVersionLimit", definition.MajorVersionLimit.Value));
+ ClientRuntimeQueryService.SetProperty(list, "MajorVersionLimit", definition.MajorVersionLimit.Value);
}
else
{
@@ -483,7 +483,7 @@ private void MapListProperties(object modelHost, List list, ListDefinition defin
{
if (ReflectionUtils.HasProperty(list, "MajorWithMinorVersionsLimit"))
{
- context.AddQuery(new ClientActionSetProperty(list, "MajorWithMinorVersionsLimit", definition.MajorWithMinorVersionsLimit.Value));
+ ClientRuntimeQueryService.SetProperty(list, "MajorWithMinorVersionsLimit", definition.MajorWithMinorVersionsLimit.Value);
}
else
{
@@ -497,12 +497,7 @@ private void MapListProperties(object modelHost, List list, ListDefinition defin
if (definition.ReadSecurity.HasValue)
{
if (ReflectionUtils.HasProperty(list, "ReadSecurity"))
- {
- context.AddQuery(new ClientActionInvokeMethod(list, "ReadSecurity", new object[]
- {
- definition.ReadSecurity.Value
- }));
- }
+ ClientRuntimeQueryService.SetProperty(list, "ReadSecurity", definition.ReadSecurity.Value);
else
{
TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
@@ -513,12 +508,7 @@ private void MapListProperties(object modelHost, List list, ListDefinition defin
if (definition.WriteSecurity.HasValue)
{
if (ReflectionUtils.HasProperty(list, "WriteSecurity"))
- {
- context.AddQuery(new ClientActionInvokeMethod(list, "WriteSecurity", new object[]
- {
- definition.WriteSecurity.Value
- }));
- }
+ ClientRuntimeQueryService.SetProperty(list, "WriteSecurity", definition.WriteSecurity.Value);
else
{
TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs
index dd003f5c4..57199a4a8 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs
@@ -195,6 +195,27 @@ public override void DeployModel(object modelHost, DefinitionBase model)
string.IsNullOrEmpty(listViewModel.Type) ? BuiltInViewType.Html : listViewModel.Type);
}
+ // nasty hack
+
+ // The provision of calendars is not working properly #935
+ // https://github.com/SubPointSolutions/spmeta2/issues/935
+ if (listViewModel.Types.Count() > 0)
+ {
+ ViewType? finalType = null;
+
+ foreach (var type in listViewModel.Types)
+ {
+ var tmpViewType = (ViewType)Enum.Parse(typeof(ViewType), type);
+
+ if (finalType == null)
+ finalType = tmpViewType;
+ else
+ finalType = finalType | tmpViewType;
+ }
+
+ newView.ViewTypeKind = finalType.Value;
+ }
+
currentView = list.Views.Add(newView);
MapListViewProperties(list, currentView, listViewModel);
@@ -278,10 +299,10 @@ public virtual void MapListViewProperties(List list, View listView, ListViewDefi
// There is no value in setting Aggregations if AggregationsStatus is not to "On"
if (!string.IsNullOrEmpty(definition.AggregationsStatus) && definition.AggregationsStatus == "On")
{
- listView.AggregationsStatus = definition.AggregationsStatus;
-
if (!string.IsNullOrEmpty(definition.Aggregations))
listView.Aggregations = definition.Aggregations;
+
+ listView.AggregationsStatus = definition.AggregationsStatus;
}
listView.Hidden = definition.Hidden;
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/RegionalSettingsModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/RegionalSettingsModelHandler.cs
index fc105d0a6..034f4ba1f 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/RegionalSettingsModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/RegionalSettingsModelHandler.cs
@@ -76,7 +76,7 @@ private void DeployRegionalSettings(object modelHost, Web web, RegionalSettingsD
if (shouldUpdate)
{
- context.AddQuery(new ClientActionInvokeMethod(settings, "Update", null));
+ ClientRuntimeQueryService.InvokeMethod(settings, "Update");
context.ExecuteQueryWithTrace();
}
}
@@ -114,84 +114,84 @@ protected virtual void MapRegionalSettings(ClientRuntimeContext context, Regiona
if (ReflectionUtils.HasPropertyPublicSetter(settings, "AdjustHijriDays")
&& definition.AdjustHijriDays.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "AdjustHijriDays", definition.AdjustHijriDays.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "AdjustHijriDays", definition.AdjustHijriDays.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "AlternateCalendarType")
&& definition.AlternateCalendarType.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "AlternateCalendarType", definition.AlternateCalendarType.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "AlternateCalendarType", definition.AlternateCalendarType.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "CalendarType")
&& definition.CalendarType.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "CalendarType", definition.CalendarType.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "CalendarType", definition.CalendarType.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "Collation")
&& definition.Collation.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "Collation", definition.Collation.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "Collation", definition.Collation.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "FirstDayOfWeek")
&& definition.FirstDayOfWeek.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "FirstDayOfWeek", definition.FirstDayOfWeek.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "FirstDayOfWeek", definition.FirstDayOfWeek.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "FirstWeekOfYear")
&& definition.FirstWeekOfYear.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "FirstWeekOfYear", definition.FirstWeekOfYear.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "FirstWeekOfYear", definition.FirstWeekOfYear.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "LocaleId")
&& definition.LocaleId.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "LocaleId", definition.LocaleId.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "LocaleId", definition.LocaleId.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "WorkDayStartHour")
&& definition.WorkDayStartHour.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "WorkDayStartHour", definition.WorkDayStartHour.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "WorkDayStartHour", definition.WorkDayStartHour.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "WorkDayEndHour")
&& definition.WorkDayEndHour.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "WorkDayEndHour", definition.WorkDayEndHour.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "WorkDayEndHour", definition.WorkDayEndHour.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "WorkDays")
&& definition.WorkDays.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "WorkDays", definition.WorkDays.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "WorkDays", definition.WorkDays.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "ShowWeeks")
&& definition.ShowWeeks.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "ShowWeeks", definition.ShowWeeks.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "ShowWeeks", definition.ShowWeeks.Value);
shouldUpdate = true;
}
if (ReflectionUtils.HasPropertyPublicSetter(settings, "Time24")
&& definition.Time24.HasValue)
{
- context.AddQuery(new ClientActionSetProperty(settings, "Time24", definition.Time24.Value));
+ ClientRuntimeQueryService.SetProperty(settings, "Time24", definition.Time24.Value);
shouldUpdate = true;
}
@@ -208,7 +208,7 @@ protected virtual void MapRegionalSettings(ClientRuntimeContext context, Regiona
string.Format("Cannot find TimeZone by ID:[{0}]", definition.TimeZoneId));
}
- context.AddQuery(new ClientActionSetProperty(settings, "TimeZone", targetZone));
+ ClientRuntimeQueryService.SetProperty(settings, "TimeZone", targetZone);
shouldUpdate = true;
}
}
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/SP2013WorkflowSubscriptionDefinitionModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/SP2013WorkflowSubscriptionDefinitionModelHandler.cs
index 910302511..af1f7d9f5 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/SP2013WorkflowSubscriptionDefinitionModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/SP2013WorkflowSubscriptionDefinitionModelHandler.cs
@@ -212,9 +212,9 @@ private void DeployWebWorkflowSubscriptionDefinition(
newSubscription.SetProperty("TaskListId", taskList.Id.ToString());
newSubscription.SetProperty("WebId", web.Id.ToString());
- newSubscription.SetProperty("Microsoft.SharePoint.ActivationProperties.WebId", web.Id.ToString());
-
- MapProperties(currentSubscription, workflowSubscriptionModel);
+ newSubscription.SetProperty("Microsoft.SharePoint.ActivationProperties.WebId", web.Id.ToString());
+
+ MapProperties(newSubscription, workflowSubscriptionModel);
InvokeOnModelEvent(this, new ModelEventArgs
{
@@ -340,9 +340,9 @@ private void DeployListWorkflowSubscriptionDefinition(
newSubscription.SetProperty("TaskListId", taskList.Id.ToString());
newSubscription.SetProperty("ListId", list.Id.ToString());
- newSubscription.SetProperty("Microsoft.SharePoint.ActivationProperties.ListId", list.Id.ToString());
-
- MapProperties(currentSubscription, workflowSubscriptionModel);
+ newSubscription.SetProperty("Microsoft.SharePoint.ActivationProperties.ListId", list.Id.ToString());
+
+ MapProperties(newSubscription, workflowSubscriptionModel);
InvokeOnModelEvent(this, new ModelEventArgs
{
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/SupportedUICultureModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/SupportedUICultureModelHandler.cs
index a543e8f2a..517626462 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/SupportedUICultureModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/SupportedUICultureModelHandler.cs
@@ -1,124 +1,119 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Microsoft.SharePoint.Client;
-using SPMeta2.Common;
-using SPMeta2.CSOM.Extensions;
-using SPMeta2.CSOM.ModelHosts;
-using SPMeta2.Definitions;
-using SPMeta2.Utils;
-using System.Reflection;
-using SPMeta2.Exceptions;
-using SPMeta2.Services;
-
-namespace SPMeta2.CSOM.ModelHandlers
-{
-
- public class SupportedUICultureModelHandler : CSOMModelHandlerBase
- {
- #region methods
-
- public override Type TargetType
- {
- get { return typeof(SupportedUICultureDefinition); }
- }
-
- public override void DeployModel(object modelHost, DefinitionBase model)
- {
- var webModel = model.WithAssertAndCast("model", value => value.RequireNotNull());
- var typedHost = modelHost.WithAssertAndCast("model", value => value.RequireNotNull());
-
- var web = typedHost.HostWeb;
- var context = web.Context;
-
- context.Load(web);
- context.Load(web, w => w.SupportedUILanguageIds);
-
- context.ExecuteQuery();
-
- InvokeOnModelEvent(this, new ModelEventArgs
- {
- CurrentModelNode = null,
- Model = null,
- EventType = ModelEventType.OnProvisioning,
- Object = web,
- ObjectType = typeof(Web),
- ObjectDefinition = model,
- ModelHost = modelHost
- });
-
- var shouldUpdate = false;
- var currentLanguages = web.SupportedUILanguageIds;
-
- if (!currentLanguages.Contains(webModel.LCID))
- {
- // if running nice CSOM, so that method is there and a few web's props
- var supportedRuntime = ReflectionUtils.HasProperty(web, "IsMultilingual")
- && ReflectionUtils.HasMethod(web, "AddSupportedUILanguage");
-
-
- if (supportedRuntime)
- {
- // TODO, wrap up into extensions
-
- // that's the trick to get all working on CSOM SP2013 SP1+
- // once props are there, we setup them
- // if not, giving critical messages in logs
-
- // pushing IsMultilingual to true if false
- var objectData = GetPropertyValue(web, "ObjectData");
- var objectProperties = GetPropertyValue(objectData, "Properties") as Dictionary;
-
- var isMultilingual = Convert.ToBoolean(objectProperties["IsMultilingual"]);
-
- if (!isMultilingual)
- {
- web.Context.AddQuery(new ClientActionSetProperty(web, "IsMultilingual", true));
- }
-
- // adding languages
- var query = new ClientActionInvokeMethod(web, "AddSupportedUILanguage", new object[]
- {
- webModel.LCID
- });
-
- context.AddQuery(query);
-
- // upating the web
- web.Update();
-
- shouldUpdate = true;
- }
- else
- {
- TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
- "CSOM runtime doesn't have Web.IsMultilingual and Web.AddSupportedUILanguage() methods support. Update CSOM runtime to a new version. SupportedUILanguage provision is skipped");
- }
- }
-
- InvokeOnModelEvent(this, new ModelEventArgs
- {
- CurrentModelNode = null,
- Model = null,
- EventType = ModelEventType.OnProvisioned,
- Object = web,
- ObjectType = typeof(Web),
- ObjectDefinition = model,
- ModelHost = modelHost
- });
-
- if (shouldUpdate)
- {
- context.ExecuteQueryWithTrace();
- }
- }
-
-
-
- #endregion
-
-
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Microsoft.SharePoint.Client;
+using SPMeta2.Common;
+using SPMeta2.CSOM.Extensions;
+using SPMeta2.CSOM.ModelHosts;
+using SPMeta2.Definitions;
+using SPMeta2.Utils;
+using System.Reflection;
+using SPMeta2.Exceptions;
+using SPMeta2.Services;
+
+namespace SPMeta2.CSOM.ModelHandlers
+{
+
+ public class SupportedUICultureModelHandler : CSOMModelHandlerBase
+ {
+ #region methods
+
+ public override Type TargetType
+ {
+ get { return typeof(SupportedUICultureDefinition); }
+ }
+
+ public override void DeployModel(object modelHost, DefinitionBase model)
+ {
+ var webModel = model.WithAssertAndCast("model", value => value.RequireNotNull());
+ var typedHost = modelHost.WithAssertAndCast("model", value => value.RequireNotNull());
+
+ var web = typedHost.HostWeb;
+ var context = web.Context;
+
+ context.Load(web);
+ context.Load(web, w => w.SupportedUILanguageIds);
+
+ context.ExecuteQuery();
+
+ InvokeOnModelEvent(this, new ModelEventArgs
+ {
+ CurrentModelNode = null,
+ Model = null,
+ EventType = ModelEventType.OnProvisioning,
+ Object = web,
+ ObjectType = typeof(Web),
+ ObjectDefinition = model,
+ ModelHost = modelHost
+ });
+
+ var shouldUpdate = false;
+ var currentLanguages = web.SupportedUILanguageIds;
+
+ if (!currentLanguages.Contains(webModel.LCID))
+ {
+ // if running nice CSOM, so that method is there and a few web's props
+ var supportedRuntime = ReflectionUtils.HasProperty(web, "IsMultilingual")
+ && ReflectionUtils.HasMethod(web, "AddSupportedUILanguage");
+
+
+ if (supportedRuntime)
+ {
+ // TODO, wrap up into extensions
+
+ // that's the trick to get all working on CSOM SP2013 SP1+
+ // once props are there, we setup them
+ // if not, giving critical messages in logs
+
+ // pushing IsMultilingual to true if false
+ var objectData = GetPropertyValue(web, "ObjectData");
+ var objectProperties = GetPropertyValue(objectData, "Properties") as Dictionary;
+
+ var isMultilingual = Convert.ToBoolean(objectProperties["IsMultilingual"]);
+
+ if (!isMultilingual)
+ {
+ ClientRuntimeQueryService.SetProperty(web, "IsMultilingual", true);
+ }
+
+ // adding languages
+ ClientRuntimeQueryService.InvokeMethod(web, "AddSupportedUILanguage", webModel.LCID);
+
+ // upating the web
+ web.Update();
+
+ shouldUpdate = true;
+ }
+ else
+ {
+ TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
+ "CSOM runtime doesn't have Web.IsMultilingual and Web.AddSupportedUILanguage() methods support. Update CSOM runtime to a new version. SupportedUILanguage provision is skipped");
+ }
+ }
+
+ InvokeOnModelEvent(this, new ModelEventArgs
+ {
+ CurrentModelNode = null,
+ Model = null,
+ EventType = ModelEventType.OnProvisioned,
+ Object = web,
+ ObjectType = typeof(Web),
+ ObjectDefinition = model,
+ ModelHost = modelHost
+ });
+
+ if (shouldUpdate)
+ {
+ context.ExecuteQueryWithTrace();
+ }
+ }
+
+
+
+ #endregion
+
+
+ }
+}
diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebModelHandler.cs
index 8f1b8fe71..1b18f8ec4 100644
--- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebModelHandler.cs
+++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebModelHandler.cs
@@ -396,7 +396,7 @@ public override void DeployModel(object modelHost, DefinitionBase model)
}
}
- private static void MapProperties(Web web, WebDefinition webModel)
+ protected virtual void MapProperties(Web web, WebDefinition webModel)
{
if (!string.IsNullOrEmpty(webModel.Title))
web.Title = webModel.Title;
@@ -411,20 +411,10 @@ private static void MapProperties(Web web, WebDefinition webModel)
var context = web.Context;
if (!string.IsNullOrEmpty(webModel.AlternateCssUrl))
- {
- context.AddQuery(new ClientActionInvokeMethod(web, "AlternateCssUrl", new object[]
- {
- webModel.AlternateCssUrl
- }));
- }
+ ClientRuntimeQueryService.SetProperty(web, "AlternateCssUrl", webModel.AlternateCssUrl);
if (!string.IsNullOrEmpty(webModel.SiteLogoUrl))
- {
- context.AddQuery(new ClientActionInvokeMethod(web, "SiteLogoUrl", new object[]
- {
- webModel.SiteLogoUrl
- }));
- }
+ ClientRuntimeQueryService.SetProperty(web, "SiteLogoUrl", webModel.SiteLogoUrl);
}
else
{
@@ -435,15 +425,7 @@ private static void MapProperties(Web web, WebDefinition webModel)
if (!string.IsNullOrEmpty(webModel.RequestAccessEmail))
{
if (ReflectionUtils.HasProperty(web, "RequestAccessEmail"))
- {
-
- var context = web.Context;
-
- context.AddQuery(new ClientActionInvokeMethod(web, "RequestAccessEmail", new object[]
- {
- webModel.SiteLogoUrl
- }));
- }
+ ClientRuntimeQueryService.SetProperty(web, "RequestAccessEmail", webModel.RequestAccessEmail);
else
{
TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
@@ -453,15 +435,7 @@ private static void MapProperties(Web web, WebDefinition webModel)
if (webModel.MembersCanShare.HasValue)
{
if (ReflectionUtils.HasProperty(web, "MembersCanShare"))
- {
- var context = web.Context;
-
- context.AddQuery(new ClientActionInvokeMethod(web, "MembersCanShare", new object[]
- {
- webModel.MembersCanShare.Value
- }));
-
- }
+ ClientRuntimeQueryService.SetProperty(web, "MembersCanShare", webModel.MembersCanShare.Value);
else
{
TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
diff --git a/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs
index 723773202..3b0f9130f 100644
--- a/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj b/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj
index 56d3a263f..2da4b7c46 100644
--- a/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj
+++ b/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj
@@ -278,12 +278,14 @@
PublishingPageTemplates.resx
+
+
diff --git a/SPMeta2/SPMeta2.CSOM/Services/CSOMLocalizationService.cs b/SPMeta2/SPMeta2.CSOM/Services/CSOMLocalizationService.cs
index 0f3e88c2c..e59508f22 100644
--- a/SPMeta2/SPMeta2.CSOM/Services/CSOMLocalizationService.cs
+++ b/SPMeta2/SPMeta2.CSOM/Services/CSOMLocalizationService.cs
@@ -1,35 +1,36 @@
-using System;
-using System.Globalization;
-using Microsoft.SharePoint.Client;
-using SPMeta2.Definitions;
-using SPMeta2.Exceptions;
-using SPMeta2.Services;
-using SPMeta2.Utils;
-
-namespace SPMeta2.CSOM.Services
-{
- public class CSOMLocalizationService : LocalizationServiceBase
- {
- public override void ProcessUserResource(object parentObject, object userResource, ValueForUICulture locValue)
- {
- var typedUserResource = userResource as ClientObject;
-
- if (typedUserResource == null)
- throw new SPMeta2Exception("userResource should be an instance of ClientObject");
-
- if (typedUserResource.GetType().Name.ToUpper() != "UserResource".ToUpper())
- throw new SPMeta2Exception("userResource should be an instance of UserResource");
-
- var context = typedUserResource.Context;
- var cultureInfo = GetUserResourceCultureInfo(locValue);
-
- var query = new ClientActionInvokeMethod(typedUserResource, "SetValueForUICulture", new object[]
- {
- cultureInfo.Name,
- locValue.Value,
- });
-
- context.AddQuery(query);
- }
- }
-}
+using System;
+using System.Globalization;
+using Microsoft.SharePoint.Client;
+using SPMeta2.Definitions;
+using SPMeta2.Exceptions;
+using SPMeta2.Services;
+using SPMeta2.Utils;
+using SPMeta2.CSOM.Services.Impl;
+
+namespace SPMeta2.CSOM.Services
+{
+ public class CSOMLocalizationService : LocalizationServiceBase
+ {
+ #region methods
+
+ public override void ProcessUserResource(object parentObject, object userResource, ValueForUICulture locValue)
+ {
+ var typedUserResource = userResource as ClientObject;
+
+ if (typedUserResource == null)
+ throw new SPMeta2Exception("userResource should be an instance of ClientObject");
+
+ if (typedUserResource.GetType().Name.ToUpper() != "UserResource".ToUpper())
+ throw new SPMeta2Exception("userResource should be an instance of UserResource");
+
+ var context = typedUserResource.Context;
+ var cultureInfo = GetUserResourceCultureInfo(locValue);
+
+ var clientRuntimeQueryService = ServiceContainer.Instance.GetService() ?? new DefaultClientRuntimeQueryService();
+
+ clientRuntimeQueryService.InvokeMethod(typedUserResource, "SetValueForUICulture", cultureInfo.Name, locValue.Value);
+ }
+
+ #endregion
+ }
+}
diff --git a/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs b/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs
index 09da6d9f1..33532627e 100644
--- a/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs
+++ b/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs
@@ -84,10 +84,39 @@ public override TokenReplacementResult ReplaceTokens(TokenReplacementContext con
{
if (!string.IsNullOrEmpty(result.Value))
{
- result.Value = tokenInfo.RegEx.Replace(result.Value, ResolveToken(context, context.Context, tokenInfo.Name));
-
- result.Value = result.Value.Replace(@"//", @"/");
- result.Value = result.Value.Replace(@"\\", @"\");
+ var replacedValue = tokenInfo.RegEx.Replace(result.Value, ResolveToken(context, context.Context, tokenInfo.Name));
+
+ if (!string.IsNullOrEmpty(replacedValue))
+ {
+ // everything to '/'
+ replacedValue = replacedValue.Replace(@"\", @"/");
+
+ // replace doubles after '://'
+ var urlParts = replacedValue.Split(new string[] { "://" }, StringSplitOptions.RemoveEmptyEntries);
+
+ // return non 'protocol://' values
+ if (urlParts.Count() == 1)
+ {
+ result.Value = urlParts[0].Replace(@"//", @"/");
+ }
+ else
+ {
+ var resultValues = new List();
+
+ resultValues.Add(urlParts[0]);
+
+ foreach (var value in urlParts.Skip(1))
+ {
+ resultValues.Add(value.Replace(@"//", @"/"));
+ }
+
+ result.Value = string.Join("://", resultValues.ToArray());
+ }
+ }
+ else
+ {
+ result.Value = replacedValue;
+ }
}
}
diff --git a/SPMeta2/SPMeta2.CSOM/Services/ClientRuntimeQueryServiceBase.cs b/SPMeta2/SPMeta2.CSOM/Services/ClientRuntimeQueryServiceBase.cs
new file mode 100644
index 000000000..8b4e4c935
--- /dev/null
+++ b/SPMeta2/SPMeta2.CSOM/Services/ClientRuntimeQueryServiceBase.cs
@@ -0,0 +1,34 @@
+using Microsoft.SharePoint.Client;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace SPMeta2.CSOM.Services
+{
+ public abstract class ClientRuntimeQueryServiceBase
+ {
+ #region methods
+ public abstract void SetProperty(ClientObject clientObject, string propertyName, object propertyValue);
+
+
+ public void InvokeMethod(ClientObject clientObject, string methodName)
+ {
+ InvokeMethod(clientObject, methodName, (object[])null);
+ }
+
+ public void InvokeMethod(ClientObject clientObject, string methodName, object methodParameter)
+ {
+ InvokeMethod(clientObject, methodName, new object[] { methodParameter });
+ }
+
+ public void InvokeMethod(ClientObject clientObject, string methodName, object p1, object p2)
+ {
+ InvokeMethod(clientObject, methodName, new object[] { p1, p2 });
+ }
+ public abstract void InvokeMethod(ClientObject clientObject, string methodName, object[] methodParameters);
+
+ #endregion
+ }
+}
diff --git a/SPMeta2/SPMeta2.CSOM/Services/Impl/DefaultClientRuntimeQueryServiceBase.cs b/SPMeta2/SPMeta2.CSOM/Services/Impl/DefaultClientRuntimeQueryServiceBase.cs
new file mode 100644
index 000000000..b6fadb117
--- /dev/null
+++ b/SPMeta2/SPMeta2.CSOM/Services/Impl/DefaultClientRuntimeQueryServiceBase.cs
@@ -0,0 +1,31 @@
+using Microsoft.SharePoint.Client;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace SPMeta2.CSOM.Services.Impl
+{
+ public class DefaultClientRuntimeQueryService : ClientRuntimeQueryServiceBase
+ {
+ #region methods
+ public override void SetProperty(ClientObject clientObject, string propertyName, object propertyValue)
+ {
+ var context = clientObject.Context;
+ var query = new ClientActionSetProperty(clientObject, propertyName, propertyValue);
+
+ context.AddQuery(query);
+ }
+
+ public override void InvokeMethod(ClientObject clientObject, string methodName, object[] methodParameters)
+ {
+ var context = clientObject.Context;
+ var query = new ClientActionInvokeMethod(clientObject, methodName, methodParameters);
+
+ context.AddQuery(query);
+ }
+
+ #endregion
+ }
+}
diff --git a/SPMeta2/SPMeta2.CSOM/Services/Impl/RequireCSOMRuntimeVersionDeploymentService.cs b/SPMeta2/SPMeta2.CSOM/Services/Impl/RequireCSOMRuntimeVersionDeploymentService.cs
index c5bd0ce5e..62f8e1d89 100644
--- a/SPMeta2/SPMeta2.CSOM/Services/Impl/RequireCSOMRuntimeVersionDeploymentService.cs
+++ b/SPMeta2/SPMeta2.CSOM/Services/Impl/RequireCSOMRuntimeVersionDeploymentService.cs
@@ -64,17 +64,28 @@ protected virtual void CheckCSOMRuntimeVersion()
// http://blogs.technet.com/b/steve_chen/archive/2013/03/26/3561010.aspx
var spAssembly = GetCSOMRuntimeAssembly();
- var spAssemblyFileVersion = FileVersionInfo.GetVersionInfo(spAssembly.Location);
-
var versionInfo = GetCSOMRuntimeVersion();
+ var assemblyLocation = string.Empty;
+
+ // RequireCSOMRuntimeVersionDeploymentService does not work under Azure Funtions #962
+ // https://github.com/SubPointSolutions/spmeta2/issues/962
+ try
+ {
+ assemblyLocation = spAssembly.Location;
+ }
+ catch (Exception assemblyLocationLoadException)
+ {
+ assemblyLocation = string.Format("Coudn't load .Location property. Exception was:[{0}]", assemblyLocationLoadException);
+ }
+
TraceService.InformationFormat((int)LogEventId.ModelProcessing,
"CSOM - CheckSharePointRuntimeVersion. Required minimal version :[{0}]. Current version: [{1}] Location: [{2}]",
new object[]
{
- MinimalVersion,
- spAssemblyFileVersion,
- spAssemblyFileVersion.ProductVersion
+ MinimalVersion,
+ versionInfo,
+ assemblyLocation
});
if (versionInfo.Major == 14)
@@ -90,8 +101,8 @@ protected virtual void CheckCSOMRuntimeVersion()
var exceptionMessage = string.Empty;
exceptionMessage += string.Format("SPMeta2.CSOM.dll requires at least SP2013 SP1 runtime ({0}).{1}", MinimalVersion, Environment.NewLine);
- exceptionMessage += string.Format(" Current Microsoft.SharePoint.Client.dll version:[{0}].{1}", spAssemblyFileVersion.ProductVersion, Environment.NewLine);
- exceptionMessage += string.Format(" Current Microsoft.SharePoint.Client.dll location:[{0}].{1}", spAssembly.Location, Environment.NewLine);
+ exceptionMessage += string.Format(" Current Microsoft.SharePoint.Client.dll version:[{0}].{1}", versionInfo.Major, Environment.NewLine);
+ exceptionMessage += string.Format(" Current Microsoft.SharePoint.Client.dll location:[{0}].{1}", assemblyLocation, Environment.NewLine);
throw new SPMeta2NotSupportedException(exceptionMessage);
}
@@ -110,11 +121,33 @@ protected virtual Assembly GetCSOMRuntimeAssembly()
protected virtual Version GetCSOMRuntimeVersion()
{
var spAssembly = GetCSOMRuntimeAssembly();
- var spAssemblyFileVersion = FileVersionInfo.GetVersionInfo(spAssembly.Location);
- var versionInfo = new Version(spAssemblyFileVersion.ProductVersion);
+ return GetAssemblyFileVersion(spAssembly);
+ }
+
+ protected virtual Version GetAssemblyFileVersion(Assembly assembly)
+ {
+ var fileVersionAttribute = Attribute.GetCustomAttribute(
+ assembly,
+ typeof(AssemblyFileVersionAttribute), false) as AssemblyFileVersionAttribute;
+
+ // paranoic about regression caused by MS changes in the future
+ if (fileVersionAttribute == null)
+ {
+ throw new SPMeta2Exception(string.Format(
+ "Cannot find AssemblyFileVersionAttribute in assembly:[{0}]",
+ assembly.FullName));
+ }
+
+ if (string.IsNullOrEmpty(fileVersionAttribute.Version))
+ {
+ throw new SPMeta2Exception(string.Format(
+ "Found AssemblyFileVersionAttribute but .Version is null or empty. Assembly:[{0}]",
+ assembly.FullName));
+ }
+
- return versionInfo;
+ return new Version(fileVersionAttribute.Version);
}
#endregion
diff --git a/SPMeta2/SPMeta2.Containers.CSOM/CSOMProvisionRunner.cs b/SPMeta2/SPMeta2.Containers.CSOM/CSOMProvisionRunner.cs
index 101fa9978..b45ac5b8b 100644
--- a/SPMeta2/SPMeta2.Containers.CSOM/CSOMProvisionRunner.cs
+++ b/SPMeta2/SPMeta2.Containers.CSOM/CSOMProvisionRunner.cs
@@ -69,7 +69,7 @@ private void InitServices()
_provisionService.OnModelNodeProcessing += (sender, args) =>
{
- Trace.WriteLine(
+ ContainerTraceUtils.WriteLine(
string.Format("Processing: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
new object[] {
args.ProcessedModelNodeCount,
@@ -82,7 +82,7 @@ private void InitServices()
_provisionService.OnModelNodeProcessed += (sender, args) =>
{
- Trace.WriteLine(
+ ContainerTraceUtils.WriteLine(
string.Format("Processed: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
new object[] {
args.ProcessedModelNodeCount,
@@ -162,7 +162,7 @@ public override void DeploySiteModel(ModelNode model)
foreach (var siteUrl in SiteUrls)
{
- Trace.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
{
@@ -192,7 +192,7 @@ public override void DeployListModel(ModelNode model)
{
foreach (var webUrl in WebUrls)
{
- Trace.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
WithCSOMContext(webUrl, context =>
{
@@ -252,7 +252,7 @@ public override void DeployWebModel(ModelNode model)
foreach (var webUrl in WebUrls)
{
- Trace.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
WithCSOMContext(webUrl, context =>
{
diff --git a/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs
index 45e1fda01..b9ee94793 100644
--- a/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
\ No newline at end of file
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
\ No newline at end of file
diff --git a/SPMeta2/SPMeta2.Containers.O365/O365ProvisionRunner.cs b/SPMeta2/SPMeta2.Containers.O365/O365ProvisionRunner.cs
index d5ad80023..92a1c2ef1 100644
--- a/SPMeta2/SPMeta2.Containers.O365/O365ProvisionRunner.cs
+++ b/SPMeta2/SPMeta2.Containers.O365/O365ProvisionRunner.cs
@@ -61,7 +61,7 @@ private void InitServices()
_provisionService.OnModelNodeProcessing += (sender, args) =>
{
- Trace.WriteLine(
+ ContainerTraceUtils.WriteLine(
string.Format("Processing: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
new object[] {
args.ProcessedModelNodeCount,
@@ -74,7 +74,7 @@ private void InitServices()
_provisionService.OnModelNodeProcessed += (sender, args) =>
{
- Trace.WriteLine(
+ ContainerTraceUtils.WriteLine(
string.Format("Processed: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
new object[] {
args.ProcessedModelNodeCount,
@@ -188,7 +188,7 @@ public override void DeploySiteModel(ModelNode model)
private void SiteOnUrl(ModelNode model, string siteUrl)
{
- Trace.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
for (var provisionGeneration = 0;
provisionGeneration < ProvisionGenerationCount;
@@ -225,7 +225,7 @@ public override void DeployListModel(ModelNode model)
private void WebOnUrl(ModelNode model, string webUrl)
{
- Trace.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
WithO365Context(webUrl, context =>
{
@@ -258,7 +258,7 @@ public override void DeployWebModel(ModelNode model)
{
foreach (var webUrl in WebUrls)
{
- Trace.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
diff --git a/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs
index ff23d1947..b87b1455a 100644
--- a/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Containers.O365v16/O365v16ProvisionRunner.cs b/SPMeta2/SPMeta2.Containers.O365v16/O365v16ProvisionRunner.cs
index f8bc80a11..2e72fa930 100644
--- a/SPMeta2/SPMeta2.Containers.O365v16/O365v16ProvisionRunner.cs
+++ b/SPMeta2/SPMeta2.Containers.O365v16/O365v16ProvisionRunner.cs
@@ -1,229 +1,262 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Security;
-using Microsoft.SharePoint.Client;
-using Microsoft.SharePoint.Client.Publishing.Navigation;
-using Microsoft.SharePoint.Client.Search.Portability;
-using Microsoft.SharePoint.Client.Taxonomy;
-using Microsoft.SharePoint.Client.WorkflowServices;
-using SPMeta2.Containers.Consts;
-using SPMeta2.Containers.Services;
-using SPMeta2.Containers.Utils;
-using SPMeta2.CSOM.ModelHosts;
-using SPMeta2.CSOM.Services;
-using SPMeta2.CSOM.Standard.ModelHandlers.Fields;
-using SPMeta2.ModelHandlers;
-using SPMeta2.Models;
-using SPMeta2.Regression.CSOM;
-using SPMeta2.Regression.CSOM.Standard.Validation.Fields;
-using SPMeta2.Utils;
-
-namespace SPMeta2.Containers.O365v16
-{
- ///
- /// O365 container runner implementation.
- ///
- public class O365v16ProvisionRunner : ProvisionRunnerBase
- {
- #region constructors
-
- public O365v16ProvisionRunner()
- {
- Name = "O365";
-
- SiteUrls = new List();
- WebUrls = new List();
-
- LoadEnvironmentConfig();
- InitServices();
-
- UserName = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_UserName);
- UserPassword = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_Password);
- }
-
- private void InitServices()
- {
- _provisionService = new CSOMProvisionService();
- _validationService = new CSOMValidationService();
-
- var csomStandartAsm = typeof(TaxonomyFieldModelHandler).Assembly;
-
- foreach (var handlerType in ReflectionUtils.GetTypesFromAssembly(csomStandartAsm))
- _provisionService.RegisterModelHandler(Activator.CreateInstance(handlerType) as ModelHandlerBase);
-
- var csomtandartValidationAsm = typeof(ClientTaxonomyFieldDefinitionValidator).Assembly;
-
- foreach (var handlerType in ReflectionUtils.GetTypesFromAssembly(csomtandartValidationAsm))
- _validationService.RegisterModelHandler(Activator.CreateInstance(handlerType) as ModelHandlerBase);
- }
-
- private void LoadEnvironmentConfig()
- {
- SiteUrls.Clear();
- SiteUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.O365_SiteUrls));
-
- WebUrls.Clear();
- WebUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.O365_WebUrls));
- }
-
- #endregion
-
- #region properties
-
- ///
- /// Target site URLs
- ///
- public List SiteUrls { get; set; }
-
- ///
- /// Target web URLs
- ///
- public List WebUrls { get; set; }
-
- ///
- /// User name
- ///
- public string UserName { get; set; }
-
- ///
- /// User password
- ///
- public string UserPassword { get; set; }
-
- private CSOMProvisionService _provisionService;
- private CSOMValidationService _validationService;
-
-
- #endregion
-
- #region methods
-
-
- ///
- /// Resolves full name of the target type.
- ///
- ///
- ///
- ///
- public override string ResolveFullTypeName(string typeName, string assemblyName)
- {
- var type = typeof(Field);
- var workflow = typeof(WorkflowDefinition);
- var store = typeof(TermStore);
- var publishing = typeof(WebNavigationSettings);
- var search = typeof(SearchConfigurationPortability);
-
- return base.ResolveFullTypeName(typeName, assemblyName);
- }
-
- ///
- /// Deploys and validates target site model.
- ///
- ///
- public override void DeploySiteModel(ModelNode model)
- {
- foreach (var siteUrl in SiteUrls)
- {
- Trace.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
-
-
- for (var provisionGeneration = 0;
- provisionGeneration < ProvisionGenerationCount;
- provisionGeneration++)
- {
- WithO365Context(siteUrl, context =>
- {
-
- if (EnableDefinitionProvision)
- _provisionService.DeployModel(SiteModelHost.FromClientContext(context), model);
-
- if (EnableDefinitionValidation)
- _validationService.DeployModel(SiteModelHost.FromClientContext(context), model);
-
- });
-
- }
-
- }
- }
-
- ///
- /// Deploys and validates target web model.
- ///
- ///
- public override void DeployWebModel(ModelNode model)
- {
- foreach (var webUrl in WebUrls)
- {
- Trace.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
-
-
-
- for (var provisionGeneration = 0;
- provisionGeneration < ProvisionGenerationCount;
- provisionGeneration++)
- {
- WithO365Context(webUrl, context =>
- {
- if (EnableDefinitionProvision)
- _provisionService.DeployModel(WebModelHost.FromClientContext(context), model);
-
- if (EnableDefinitionValidation)
- _validationService.DeployModel(WebModelHost.FromClientContext(context), model);
-
- });
- }
-
-
- }
- }
-
- #endregion
-
- #region utils
-
- #region static
-
- private static SecureString GetSecurePasswordString(string password)
- {
- var securePassword = new SecureString();
-
- foreach (var s in password)
- securePassword.AppendChar(s);
-
- return securePassword;
- }
-
- #endregion
-
- ///
- /// Invokes target action under O365 client context.
- ///
- ///
- ///
- public void WithO365Context(string siteUrl, Action action)
- {
- WithO365Context(siteUrl, UserName, UserPassword, action);
- }
-
- ///
- /// Invokes target action under O365 client context.
- ///
- ///
- ///
- ///
- ///
- private void WithO365Context(string siteUrl, string userName, string userPassword, Action action)
- {
- using (var context = new ClientContext(siteUrl))
- {
- context.Credentials = new SharePointOnlineCredentials(userName, GetSecurePasswordString(userPassword));
- action(context);
- }
- }
-
-
- #endregion
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Security;
+using Microsoft.SharePoint.Client;
+using Microsoft.SharePoint.Client.Publishing.Navigation;
+using Microsoft.SharePoint.Client.Search.Portability;
+using Microsoft.SharePoint.Client.Taxonomy;
+using Microsoft.SharePoint.Client.WorkflowServices;
+using SPMeta2.Containers.Consts;
+using SPMeta2.Containers.Services;
+using SPMeta2.Containers.Utils;
+using SPMeta2.CSOM.ModelHosts;
+using SPMeta2.CSOM.Services;
+using SPMeta2.CSOM.Standard.ModelHandlers.Fields;
+using SPMeta2.ModelHandlers;
+using SPMeta2.Models;
+using SPMeta2.Regression.CSOM;
+using SPMeta2.Regression.CSOM.Standard.Validation.Fields;
+using SPMeta2.Utils;
+
+namespace SPMeta2.Containers.O365v16
+{
+ ///
+ /// O365 container runner implementation.
+ ///
+ public class O365v16ProvisionRunner : ProvisionRunnerBase
+ {
+ #region constructors
+
+ public O365v16ProvisionRunner()
+ {
+ Name = "O365";
+
+ SiteUrls = new List();
+ WebUrls = new List();
+
+ LoadEnvironmentConfig();
+ InitServices();
+
+ UserName = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_UserName);
+ UserPassword = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_Password);
+ }
+
+ private void InitServices()
+ {
+ _provisionService = new CSOMProvisionService();
+ _validationService = new CSOMValidationService();
+
+ var csomStandartAsm = typeof(TaxonomyFieldModelHandler).Assembly;
+
+ foreach (var handlerType in ReflectionUtils.GetTypesFromAssembly(csomStandartAsm))
+ _provisionService.RegisterModelHandler(Activator.CreateInstance(handlerType) as ModelHandlerBase);
+
+ var csomtandartValidationAsm = typeof(ClientTaxonomyFieldDefinitionValidator).Assembly;
+
+ foreach (var handlerType in ReflectionUtils.GetTypesFromAssembly(csomtandartValidationAsm))
+ _validationService.RegisterModelHandler(Activator.CreateInstance(handlerType) as ModelHandlerBase);
+
+ _provisionService.OnModelNodeProcessing += (sender, args) =>
+ {
+ ContainerTraceUtils.WriteLine(
+ string.Format("Processing: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
+ new object[] {
+ args.ProcessedModelNodeCount,
+ args.TotalModelNodeCount,
+ 100d * (double)args.ProcessedModelNodeCount / (double)args.TotalModelNodeCount,
+ args.CurrentNode.Value.GetType().Name,
+ args.CurrentNode.Value
+ }));
+ };
+
+ _provisionService.OnModelNodeProcessed += (sender, args) =>
+ {
+ ContainerTraceUtils.WriteLine(
+ string.Format("Processed: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
+ new object[] {
+ args.ProcessedModelNodeCount,
+ args.TotalModelNodeCount,
+ 100d * (double)args.ProcessedModelNodeCount / (double)args.TotalModelNodeCount,
+ args.CurrentNode.Value.GetType().Name,
+ args.CurrentNode.Value
+ }));
+ };
+ }
+
+ private void LoadEnvironmentConfig()
+ {
+ SiteUrls.Clear();
+ SiteUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.O365_SiteUrls));
+
+ WebUrls.Clear();
+ WebUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.O365_WebUrls));
+ }
+
+ #endregion
+
+ #region properties
+
+ ///
+ /// Target site URLs
+ ///
+ public List SiteUrls { get; set; }
+
+ ///
+ /// Target web URLs
+ ///
+ public List WebUrls { get; set; }
+
+ ///
+ /// User name
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// User password
+ ///
+ public string UserPassword { get; set; }
+
+ private CSOMProvisionService _provisionService;
+ private CSOMValidationService _validationService;
+
+
+ #endregion
+
+ #region methods
+
+
+ ///
+ /// Resolves full name of the target type.
+ ///
+ ///
+ ///
+ ///
+ public override string ResolveFullTypeName(string typeName, string assemblyName)
+ {
+ var type = typeof(Field);
+ var workflow = typeof(WorkflowDefinition);
+ var store = typeof(TermStore);
+ var publishing = typeof(WebNavigationSettings);
+ var search = typeof(SearchConfigurationPortability);
+
+ return base.ResolveFullTypeName(typeName, assemblyName);
+ }
+
+ ///
+ /// Deploys and validates target site model.
+ ///
+ ///
+ public override void DeploySiteModel(ModelNode model)
+ {
+ foreach (var siteUrl in SiteUrls)
+ {
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
+
+
+ for (var provisionGeneration = 0;
+ provisionGeneration < ProvisionGenerationCount;
+ provisionGeneration++)
+ {
+ WithO365Context(siteUrl, context =>
+ {
+
+ if (EnableDefinitionProvision)
+ _provisionService.DeployModel(SiteModelHost.FromClientContext(context), model);
+
+ if (EnableDefinitionValidation)
+ _validationService.DeployModel(SiteModelHost.FromClientContext(context), model);
+
+ });
+
+ }
+
+ }
+ }
+
+ ///
+ /// Deploys and validates target web model.
+ ///
+ ///
+ public override void DeployWebModel(ModelNode model)
+ {
+ foreach (var webUrl in WebUrls)
+ {
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
+
+
+
+ for (var provisionGeneration = 0;
+ provisionGeneration < ProvisionGenerationCount;
+ provisionGeneration++)
+ {
+ WithO365Context(webUrl, context =>
+ {
+ if (EnableDefinitionProvision)
+ _provisionService.DeployModel(WebModelHost.FromClientContext(context), model);
+
+ if (EnableDefinitionValidation)
+ _validationService.DeployModel(WebModelHost.FromClientContext(context), model);
+
+ });
+ }
+
+
+ }
+ }
+
+ #endregion
+
+ #region utils
+
+ #region static
+
+ private static SecureString GetSecurePasswordString(string password)
+ {
+ var securePassword = new SecureString();
+
+ foreach (var s in password)
+ securePassword.AppendChar(s);
+
+ return securePassword;
+ }
+
+ #endregion
+
+ ///
+ /// Invokes target action under O365 client context.
+ ///
+ ///
+ ///
+ public void WithO365Context(string siteUrl, Action action)
+ {
+ WithO365Context(siteUrl, UserName, UserPassword, action);
+ }
+
+ ///
+ /// Invokes target action under O365 client context.
+ ///
+ ///
+ ///
+ ///
+ ///
+ private void WithO365Context(string siteUrl, string userName, string userPassword, Action action)
+ {
+ using (var context = new ClientContext(siteUrl))
+ {
+ context.Credentials = new SharePointOnlineCredentials(userName, GetSecurePasswordString(userPassword));
+
+ context.Load(context.Site, s => s.ServerRelativeUrl);
+ context.Load(context.Web);
+ context.Load(context.Web, s => s.ServerRelativeUrl);
+
+ context.ExecuteQuery();
+
+ action(context);
+ }
+ }
+
+
+ #endregion
+ }
+}
diff --git a/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs
index 123738bec..b2d5576ef 100644
--- a/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
\ No newline at end of file
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
\ No newline at end of file
diff --git a/SPMeta2/SPMeta2.Containers.O365v16/SPMeta2.Containers.O365v16.csproj b/SPMeta2/SPMeta2.Containers.O365v16/SPMeta2.Containers.O365v16.csproj
index e7f5df396..09de2dc46 100644
--- a/SPMeta2/SPMeta2.Containers.O365v16/SPMeta2.Containers.O365v16.csproj
+++ b/SPMeta2/SPMeta2.Containers.O365v16/SPMeta2.Containers.O365v16.csproj
@@ -1,164 +1,182 @@
-
-
-
-
- Debug
- AnyCPU
- {E9274D1F-BF08-44CB-9162-35110379D5C0}
- Library
- Properties
- SPMeta2.Containers.O365v16
- SPMeta2.Containers.O365v16
- v4.5
- 512
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- bin\Debug40\
-
-
- true
- bin\Debug45\
- DEBUG;TRACE
- full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\CI-O365\
- DEBUG;TRACE
- full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\CI-CSOM2013\
- DEBUG;TRACE
- full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.Office.Client.Policy.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.Office.Client.TranslationServices.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.Office.Client.TranslationServices.Portable.dll
-
-
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.Online.SharePoint.Client.Tenant.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.DocumentManagement.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.DocumentManagement.Portable.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.Publishing.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.Runtime.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.Search.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.Search.Applications.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.Taxonomy.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.UserProfiles.dll
-
-
- False
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.0.2617.1200\Microsoft.SharePoint.Client.WorkflowServices.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}
- SPMeta2.Containers
-
-
- {5E592EAA-E21F-4BF4-8EDF-6F6452DC916A}
- SPMeta2.CSOM.Standard
-
-
- {6F7EBF0C-7124-44D6-B9EC-302A54A19FE4}
- SPMeta2.CSOM
-
-
- {33B40E92-C649-41FC-B774-53D259801B3B}
- SPMeta2.Regression.CSOM.Standard
-
-
- {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}
- SPMeta2.Regression.CSOM
-
-
- {EE49D3FD-6180-40E6-829F-6831FF89DAC6}
- SPMeta2
-
-
-
+
+
+
+
+ Debug
+ AnyCPU
+ {E9274D1F-BF08-44CB-9162-35110379D5C0}
+ Library
+ Properties
+ SPMeta2.Containers.O365v16
+ SPMeta2.Containers.O365v16
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ bin\Debug40\
+
+
+ true
+ bin\Debug45\
+ DEBUG;TRACE
+ full
+ AnyCPU
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+ true
+ bin\CI-O365\
+ DEBUG;TRACE
+ full
+ AnyCPU
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+ true
+ bin\CI-CSOM2013\
+ DEBUG;TRACE
+ full
+ AnyCPU
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.Office.Client.Policy.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.Office.Client.TranslationServices.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.Office.SharePoint.Tools.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.Online.SharePoint.Client.Tenant.dll
+
+
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.ProjectServer.Client.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.DocumentManagement.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Publishing.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Runtime.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Runtime.Windows.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Search.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Search.Applications.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Taxonomy.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.UserProfiles.dll
+
+
+ False
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.WorkflowServices.dll
+
+
+ False
+ ..\SPMeta2.CSOM\bin\Debug45-365\SPMeta2.CSOM.dll
+
+
+ False
+ ..\SPMeta2.CSOM.Standard\bin\Debug45-365\SPMeta2.CSOM.Standard.dll
+
+
+
+ True
+ ..\SPMeta2.CSOM\bin\Debug\SPMeta2.CSOM.dll
+ False
+
+
+
+ True
+ ..\SPMeta2.CSOM\bin\Debug\SPMeta2.CSOM.Standard.dll
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {091C48FB-27E3-4F84-897C-5DE7BB55A2D3}
+ SPMeta2.Containers
+
+
+ {33B40E92-C649-41FC-B774-53D259801B3B}
+ SPMeta2.Regression.CSOM.Standard
+
+
+ {5A1B98BF-4EA4-4DEE-988F-FA62EEFC9EB0}
+ SPMeta2.Regression.CSOM
+
+
+ {EE49D3FD-6180-40E6-829F-6831FF89DAC6}
+ SPMeta2
+
+
+
+ -->
\ No newline at end of file
diff --git a/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs
index 9deaf7ebc..0e67140fa 100644
--- a/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Containers.SSOM/SSOMProvisionRunner.cs b/SPMeta2/SPMeta2.Containers.SSOM/SSOMProvisionRunner.cs
index 505ae73d6..1fe297c7f 100644
--- a/SPMeta2/SPMeta2.Containers.SSOM/SSOMProvisionRunner.cs
+++ b/SPMeta2/SPMeta2.Containers.SSOM/SSOMProvisionRunner.cs
@@ -80,7 +80,7 @@ private void InitServices()
_provisionService.OnModelNodeProcessing += (sender, args) =>
{
- Trace.WriteLine(
+ ContainerTraceUtils.WriteLine(
string.Format("Processing: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
new object[] {
args.ProcessedModelNodeCount,
@@ -93,7 +93,7 @@ private void InitServices()
_provisionService.OnModelNodeProcessed += (sender, args) =>
{
- Trace.WriteLine(
+ ContainerTraceUtils.WriteLine(
string.Format("Processed: [{0}/{1}] - [{2:0} %] - [{3}] [{4}]",
new object[] {
args.ProcessedModelNodeCount,
@@ -183,7 +183,7 @@ public override void DeployWebApplicationModel(ModelNode model)
foreach (var webAppUrl in WebApplicationUrls)
{
- Trace.WriteLine(string.Format("[INF] Running on web app: [{0}]", webAppUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web app: [{0}]", webAppUrl));
for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
{
@@ -341,7 +341,7 @@ public override void DeploySiteModel(ModelNode model)
{
//var siteUrl = GetTargetSiteCollectionUrl();
- Trace.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on site: [{0}]", siteUrl));
for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
{
@@ -367,7 +367,7 @@ public override void DeployWebModel(ModelNode model)
//var webUrl = GetTargetSiteCollectionUrl();
- Trace.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
{
@@ -389,7 +389,7 @@ public override void DeployListModel(ModelNode model)
{
foreach (var webUrl in WebUrls)
{
- Trace.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Running on web: [{0}]", webUrl));
for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
{
diff --git a/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs
index 3ef96a102..edf09de45 100644
--- a/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs
index 30ad9390f..732ce7dcb 100644
--- a/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj
index 8598ce27e..4f58668d6 100644
--- a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj
+++ b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj
@@ -255,8 +255,9 @@
True
DocumentTemplates.resx
+
-
+
True
@@ -348,6 +349,9 @@
Always
+
+ Always
+
diff --git a/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs b/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs
index d0649c195..af51b7cee 100644
--- a/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs
+++ b/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs
@@ -149,7 +149,7 @@ protected virtual void InitRunnerTypes()
{
var runnerLibraries = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.RunnerLibraries);
- Trace.WriteLine(string.Format("Testing with runner libraries: [{0}]", runnerLibraries));
+ ContainerTraceUtils.WriteLine(string.Format("Testing with runner libraries: [{0}]", runnerLibraries));
if (!string.IsNullOrEmpty(runnerLibraries))
{
@@ -498,11 +498,11 @@ public void TestModels(IEnumerable models, bool deployOnce)
foreach (var model in models)
{
- Trace.WriteLine(string.Format(".ToPrettyPrint() result:"));
- Trace.WriteLine(model.ToPrettyPrint());
+ ContainerTraceUtils.WriteLine(string.Format(".ToPrettyPrint() result:"));
+ ContainerTraceUtils.WriteLine(model.ToPrettyPrint());
- Trace.WriteLine(string.Format(".ToDotGraph result:"));
- Trace.WriteLine(model.ToDotGraph());
+ ContainerTraceUtils.WriteLine(string.Format(".ToDotGraph result:"));
+ ContainerTraceUtils.WriteLine(model.ToDotGraph());
if (EnableDefinitionImmutabilityValidation)
PersistDefinitionHashes(new[] { model });
@@ -667,12 +667,12 @@ public ModelValidationResult()
private bool ResolveModelValidation(ModelNode modelNode, string start, List hooks)
{
// should be re-written with ModelTreeTraverseService
- Trace.WriteLine(string.Format(""));
+ ContainerTraceUtils.WriteLine(string.Format(""));
var hasMissedOrInvalidProps = false;
var model = modelNode.Value;
- Trace.WriteLine(string.Format("[INF]{2}MODEL CHECK [{0}] - ( {1} )", model.GetType(), model.ToString(), start));
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{2}MODEL CHECK [{0}] - ( {1} )", model.GetType(), model.ToString(), start));
//if (model.RequireSelfProcessing || modelNode.Options.RequireSelfProcessing)
if (modelNode.Options.RequireSelfProcessing)
@@ -698,7 +698,7 @@ private bool ResolveModelValidation(ModelNode modelNode, string start, List p.Name))
{
@@ -777,7 +777,7 @@ var property in
{
if (!ShowOnlyFalseResults)
{
- Trace.WriteLine(string.Format("[INF]{2} [{0}] - [{1}]",
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{2} [{0}] - [{1}]",
"VALIDATED",
shouldBeValidatedProp.Name,
start));
@@ -785,7 +785,7 @@ var property in
}
else
{
- Trace.WriteLine(string.Format("[ERR]{2} [{0}] - [{1}]",
+ ContainerTraceUtils.WriteLine(string.Format("[ERR]{2} [{0}] - [{1}]",
"MISSED",
shouldBeValidatedProp.Name,
start));
@@ -794,14 +794,14 @@ var property in
}
else
{
- Trace.WriteLine(string.Format("[INF]{0}EnablePropertyValidation == false. Skipping...", start));
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{0}EnablePropertyValidation == false. Skipping...", start));
}
- Trace.WriteLine(string.Format("[INF]{0}EVENT CHECK", start));
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{0}EVENT CHECK", start));
if (EnableEventValidation && !modelNode.RegIsExcludeFromEventsValidation())
{
- Trace.WriteLine(string.Format("[INF]{0}EnableEventValidation == true. Checking...", start));
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{0}EnableEventValidation == true. Checking...", start));
var hook = hooks.FirstOrDefault(h => h.ModelNode == modelNode);
@@ -811,23 +811,23 @@ var property in
}
else
{
- Trace.WriteLine(string.Format("[ERR]{2} Missing hook validation for model [{0}] - ( {1} )",
+ ContainerTraceUtils.WriteLine(string.Format("[ERR]{2} Missing hook validation for model [{0}] - ( {1} )",
model.GetType(), model.ToString(), start));
}
}
else
{
- Trace.WriteLine(string.Format("[INF]{0}EnableEventValidation == false. Skipping...", start));
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{0}EnableEventValidation == false. Skipping...", start));
}
}
else
{
- Trace.WriteLine(string.Format("[INF]{0} Skipping due .RegIsExcludedFromValidation == TRUE", start));
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{0} Skipping due .RegIsExcludedFromValidation == TRUE", start));
}
}
else
{
- Trace.WriteLine(string.Format("[INF]{0} Skipping due RequireSelfProcessing == FALSE", start));
+ ContainerTraceUtils.WriteLine(string.Format("[INF]{0} Skipping due RequireSelfProcessing == FALSE", start));
}
foreach (var childModel in modelNode.ChildModels)
@@ -843,7 +843,7 @@ var property in
protected void ResolveHook(EventHooks eventHooks, string start)
{
- TraceUtils.WithScope(traceScope =>
+ IndentableTrace.WithScope(traceScope =>
{
if (eventHooks.OnProvisioning)
{
@@ -884,17 +884,17 @@ protected void WithProvisionRunnerContext(Action action)
CurrentProvisionRunner = provisionRunner;
- Trace.WriteLine(string.Format("[INF] Testing with runner impl: [{0}]", type));
- Trace.WriteLine(string.Format("[INF] Testing with Is64BitProcess flag: [{0}]", Environment.Is64BitProcess));
- Trace.WriteLine(string.Format(@"[INF] Testing as user: [{0}\{1}]", Environment.UserDomainName, Environment.UserName));
- Trace.WriteLine(string.Empty);
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Testing with runner impl: [{0}]", type));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] Testing with Is64BitProcess flag: [{0}]", Environment.Is64BitProcess));
+ ContainerTraceUtils.WriteLine(string.Format(@"[INF] Testing as user: [{0}\{1}]", Environment.UserDomainName, Environment.UserName));
+ ContainerTraceUtils.WriteLine(string.Empty);
- Trace.WriteLine(string.Format("[INF] - Current VM: [{0}]", Environment.MachineName));
- Trace.WriteLine(string.Format("[INF] - Current VM CPU: [{0}]", Environment.ProcessorCount));
- Trace.WriteLine(string.Empty);
+ ContainerTraceUtils.WriteLine(string.Format("[INF] - Current VM: [{0}]", Environment.MachineName));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] - Current VM CPU: [{0}]", Environment.ProcessorCount));
+ ContainerTraceUtils.WriteLine(string.Empty);
- Trace.WriteLine(string.Format("[INF] - ProvisionGenerationCount: [{0}]", ProvisionGenerationCount));
- Trace.WriteLine(string.Format("[INF] - EnableDefinitionValidation: [{0}]", EnableDefinitionValidation));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] - ProvisionGenerationCount: [{0}]", ProvisionGenerationCount));
+ ContainerTraceUtils.WriteLine(string.Format("[INF] - EnableDefinitionValidation: [{0}]", EnableDefinitionValidation));
action(new ProvisionRunnerContext
{
diff --git a/SPMeta2/SPMeta2.Containers/Services/Rnd/DefaultRandomService.cs b/SPMeta2/SPMeta2.Containers/Services/Rnd/DefaultRandomService.cs
index 6408481fc..c08711a7e 100644
--- a/SPMeta2/SPMeta2.Containers/Services/Rnd/DefaultRandomService.cs
+++ b/SPMeta2/SPMeta2.Containers/Services/Rnd/DefaultRandomService.cs
@@ -1,117 +1,119 @@
-using System;
-using System.Text;
-using SPMeta2.Containers.Consts;
-using SPMeta2.Containers.Utils;
-
-namespace SPMeta2.Containers.Services.Rnd
-{
- public class DefaultRandomService : RandomService
- {
- double _defaultTrueProbability = 0.49;
- private Random _rnd = new Random();
-
- public override Guid Guid()
- {
- return System.Guid.NewGuid();
- }
-
- public override string String()
- {
- return String(32);
- }
-
- public override string String(long lenght)
- {
- var iterations = (lenght / 32) + 1;
-
- var result = string.Empty;
-
- for (var i = 0; i < iterations; i++)
- result += System.Guid.NewGuid().ToString("N");
-
- return result.Substring(0, (int)lenght);
- }
-
- public override int Int()
- {
- return Int(int.MaxValue);
- }
-
- public override int Int(int maxValue)
- {
- return _rnd.Next(maxValue);
- }
-
- public override double Double()
- {
- return Double(100);
- }
-
- public override double Double(double maxValue)
- {
- return _rnd.NextDouble() * maxValue;
- }
-
- public override bool Bool()
- {
-
- return _rnd.NextDouble() < _defaultTrueProbability;
- }
-
- public override string UserLogin()
- {
- var userLogins = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestUserLogins);
-
- if (!string.IsNullOrEmpty(userLogins))
- {
- var logins = userLogins.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
- return logins[Int(logins.Length)];
- }
-
- throw new Exception(string.Format("Environment value [{0}] is NULL", EnvironmentConsts.DefaultTestUserLogins));
- }
-
- public override string UserEmail()
- {
- return string.Format("{0}@{0}.com", Environment.UserName);
- }
-
- public override string UserName()
- {
- return string.Format("{0}", Environment.UserName);
- }
-
- public override string ManagedPath()
- {
- return "sites";
- }
-
- public override byte[] Content()
- {
- return Content(32);
- }
-
- public override byte[] Content(long lenght)
- {
- return Encoding.UTF8.GetBytes(String(lenght));
- }
-
- public override string DbServerName()
- {
- return string.Format("{0}", RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultSqlServerName));
- }
-
- public override string ActiveDirectoryGroup()
- {
- var groups = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestADGroups);
-
- if (!string.IsNullOrEmpty(groups))
- {
- var groupValues = groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
- return groupValues[Int(groupValues.Length)];
- }
-
- throw new Exception(string.Format("Environment value [{0}] is NULL", EnvironmentConsts.DefaultTestADGroups));
- }
- }
-}
+using System;
+using System.Text;
+using SPMeta2.Containers.Consts;
+using SPMeta2.Containers.Utils;
+
+namespace SPMeta2.Containers.Services.Rnd
+{
+ public class DefaultRandomService : RandomService
+ {
+ double _defaultTrueProbability = 0.49;
+ private Random _rnd = new Random();
+
+ public override Guid Guid()
+ {
+ return System.Guid.NewGuid();
+ }
+
+ public override string String()
+ {
+ return String(32);
+ }
+
+ public override string String(long lenght)
+ {
+ var iterations = (lenght / 32) + 1;
+
+ var result = string.Empty;
+
+ for (var i = 0; i < iterations; i++)
+ result += System.Guid.NewGuid().ToString("N");
+
+ return result.Substring(0, (int)lenght);
+ }
+
+ public override int Int()
+ {
+ return Int(int.MaxValue);
+ }
+
+ public override int Int(int maxValue)
+ {
+ return _rnd.Next(maxValue);
+ }
+
+ public override double Double()
+ {
+ return Double(100);
+ }
+
+ public override double Double(double maxValue)
+ {
+ return _rnd.NextDouble() * maxValue;
+ }
+
+ public override bool Bool()
+ {
+
+ return _rnd.NextDouble() < _defaultTrueProbability;
+ }
+
+ public override string UserLogin()
+ {
+ var userLogins = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestUserLogins);
+
+ if (!string.IsNullOrEmpty(userLogins))
+ {
+ var logins = userLogins.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
+ return logins[Int(logins.Length)];
+ }
+
+ throw new Exception(string.Format("Environment value [{0}] is NULL", EnvironmentConsts.DefaultTestUserLogins));
+ }
+
+ public override string UserEmail()
+ {
+ return string.Format("{0}@{0}.com", Environment.UserName);
+ }
+
+ public override string UserName()
+ {
+ return string.Format("{0}", Environment.UserName);
+ }
+
+ public override string ManagedPath()
+ {
+ return "sites";
+ }
+
+ public override byte[] Content()
+ {
+ return Content(32);
+ }
+
+ public override byte[] Content(long lenght)
+ {
+ return Encoding.UTF8.GetBytes(String(lenght));
+ }
+
+ public override string DbServerName()
+ {
+ var dbServerName = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultSqlServerName);
+
+ return string.Format("{0}", dbServerName);
+ }
+
+ public override string ActiveDirectoryGroup()
+ {
+ var groups = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestADGroups);
+
+ if (!string.IsNullOrEmpty(groups))
+ {
+ var groupValues = groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
+ return groupValues[Int(groupValues.Length)];
+ }
+
+ throw new Exception(string.Format("Environment value [{0}] is NULL", EnvironmentConsts.DefaultTestADGroups));
+ }
+ }
+}
diff --git a/SPMeta2/SPMeta2.Containers/Utils/ContainerTraceUtils.cs b/SPMeta2/SPMeta2.Containers/Utils/ContainerTraceUtils.cs
new file mode 100644
index 000000000..f5efa42af
--- /dev/null
+++ b/SPMeta2/SPMeta2.Containers/Utils/ContainerTraceUtils.cs
@@ -0,0 +1,30 @@
+using SPMeta2.Services;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SPMeta2.Containers.Utils
+{
+ public static class ContainerTraceUtils
+ {
+ #region static
+
+ static ContainerTraceUtils()
+ {
+ }
+
+ #endregion
+
+ #region methods
+
+ public static void WriteLine(string message)
+ {
+ var m2logService = ServiceContainer.Instance.GetService();
+ m2logService.Information(0, message);
+ }
+
+ #endregion
+ }
+}
diff --git a/SPMeta2/SPMeta2.Containers/Utils/IndentableTrace.cs b/SPMeta2/SPMeta2.Containers/Utils/IndentableTrace.cs
new file mode 100644
index 000000000..227366db8
--- /dev/null
+++ b/SPMeta2/SPMeta2.Containers/Utils/IndentableTrace.cs
@@ -0,0 +1,72 @@
+using SPMeta2.Services;
+using System;
+using System.Diagnostics;
+
+namespace SPMeta2.Containers.Utils
+{
+ public class IndentableTrace
+ {
+ #region static
+
+ static IndentableTrace()
+ {
+ DefaultIndentString = " ";
+ }
+
+
+ public static string DefaultIndentString { get; set; }
+
+ public static void WithScope(Action action)
+ {
+ action(new IndentableTrace());
+ }
+
+
+ #endregion
+
+ #region properties
+
+ protected int IndentIndex { get; set; }
+ protected string IndentString { get; set; }
+
+ #endregion
+
+ #region methods
+
+ protected string GetCurrentIndent()
+ {
+ var result = string.Empty;
+
+ for (var i = 0; i < IndentIndex; i++)
+ result += (IndentString ?? DefaultIndentString);
+
+ return result;
+ }
+
+ public IndentableTrace WriteLine(string traceMessage)
+ {
+ var m2logService = ServiceContainer.Instance.GetService();
+
+ m2logService.Information(0, string.Format("{0}{1}", GetCurrentIndent(), traceMessage));
+
+ return this;
+ }
+
+ public IndentableTrace WithTraceIndent(Action action)
+ {
+ try
+ {
+ IndentIndex++;
+ action(this);
+ }
+ finally
+ {
+ IndentIndex--;
+ }
+
+ return this;
+ }
+
+ #endregion
+ }
+}
diff --git a/SPMeta2/SPMeta2.Containers/Utils/TraceUtils.cs b/SPMeta2/SPMeta2.Containers/Utils/TraceUtils.cs
deleted file mode 100644
index 8a3313e1a..000000000
--- a/SPMeta2/SPMeta2.Containers/Utils/TraceUtils.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using System;
-using System.Diagnostics;
-
-namespace SPMeta2.Containers.Utils
-{
- public class TraceUtils
- {
- #region static
-
- public static void WithScope(Action action)
- {
- action(new TraceUtils());
- }
-
- #endregion
-
- #region properties
-
- protected int IndentIndex { get; set; }
-
- #endregion
-
- #region methods
-
- protected string GetCurrentIndent()
- {
- var result = string.Empty;
-
- for (var i = 0; i < IndentIndex; i++)
- result += " ";
-
- return result;
- }
-
- public TraceUtils WriteLine(string traceMessage)
- {
- Trace.WriteLine(string.Format("{0}{1}", GetCurrentIndent(), traceMessage));
-
- return this;
- }
-
- public TraceUtils WithTraceIndent(Action action)
- {
- try
- {
- IndentIndex++;
- action(this);
- }
- finally
- {
- IndentIndex--;
- }
-
- return this;
- }
-
- #endregion
- }
-}
diff --git a/SPMeta2/SPMeta2.Nintex.CSOM/Class1.cs b/SPMeta2/SPMeta2.Nintex.CSOM/Class1.cs
new file mode 100644
index 000000000..0aa2d4e16
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex.CSOM/Class1.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace SPMeta2.Nintex.CSOM
+{
+ public class Class1
+ {
+ }
+}
diff --git a/SPMeta2/SPMeta2.Nintex.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Nintex.CSOM/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..b8b030b13
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex.CSOM/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SPMeta2.Nintex.CSOM")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Vagrant")]
+[assembly: AssemblyProduct("SPMeta2.Nintex.CSOM")]
+[assembly: AssemblyCopyright("Copyright © Vagrant 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f6bed080-194b-43d7-bd31-6e3e1c1b120b")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Nintex.CSOM/SPMeta2.Nintex.CSOM.csproj b/SPMeta2/SPMeta2.Nintex.CSOM/SPMeta2.Nintex.CSOM.csproj
new file mode 100644
index 000000000..e141fa8b5
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex.CSOM/SPMeta2.Nintex.CSOM.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {588FC30F-1C85-410E-AB20-C9741DB28857}
+ Library
+ Properties
+ SPMeta2.Nintex.CSOM
+ SPMeta2.Nintex.CSOM
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SPMeta2/SPMeta2.Nintex.SSOM/Class1.cs b/SPMeta2/SPMeta2.Nintex.SSOM/Class1.cs
new file mode 100644
index 000000000..71ff76bdd
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex.SSOM/Class1.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace SPMeta2.Nintex.SSOM
+{
+ public class Class1
+ {
+ }
+}
diff --git a/SPMeta2/SPMeta2.Nintex.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Nintex.SSOM/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..8dc2a59fb
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex.SSOM/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SPMeta2.Nintex.SSOM")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Vagrant")]
+[assembly: AssemblyProduct("SPMeta2.Nintex.SSOM")]
+[assembly: AssemblyCopyright("Copyright © Vagrant 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1560f275-9779-4d1b-95b1-454c9efb10b0")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Nintex.SSOM/SPMeta2.Nintex.SSOM.csproj b/SPMeta2/SPMeta2.Nintex.SSOM/SPMeta2.Nintex.SSOM.csproj
new file mode 100644
index 000000000..03ad36fbe
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex.SSOM/SPMeta2.Nintex.SSOM.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3}
+ Library
+ Properties
+ SPMeta2.Nintex.SSOM
+ SPMeta2.Nintex.SSOM
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SPMeta2/SPMeta2.Nintex/Class1.cs b/SPMeta2/SPMeta2.Nintex/Class1.cs
new file mode 100644
index 000000000..c71836158
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex/Class1.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace SPMeta2.Nintex
+{
+ public class Class1
+ {
+ }
+}
diff --git a/SPMeta2/SPMeta2.Nintex/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Nintex/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..1958401b4
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SPMeta2.Nintex")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Vagrant")]
+[assembly: AssemblyProduct("SPMeta2.Nintex")]
+[assembly: AssemblyCopyright("Copyright © Vagrant 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("4582fc2f-033d-420d-9100-6f7928847855")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Nintex/SPMeta2.Nintex.csproj b/SPMeta2/SPMeta2.Nintex/SPMeta2.Nintex.csproj
new file mode 100644
index 000000000..c79c983c3
--- /dev/null
+++ b/SPMeta2/SPMeta2.Nintex/SPMeta2.Nintex.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {D19B0907-CED5-416A-9D45-0F112990C234}
+ Library
+ Properties
+ SPMeta2.Nintex
+ SPMeta2.Nintex
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs
index ce90b40b6..23de1ba37 100644
--- a/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs
index 95e79b184..5a6b1dbf2 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Regression.CSOM.Standard/SPMeta2.Regression.CSOM.Standard.csproj b/SPMeta2/SPMeta2.Regression.CSOM.Standard/SPMeta2.Regression.CSOM.Standard.csproj
index 361454f36..4d8c02af8 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM.Standard/SPMeta2.Regression.CSOM.Standard.csproj
+++ b/SPMeta2/SPMeta2.Regression.CSOM.Standard/SPMeta2.Regression.CSOM.Standard.csproj
@@ -47,28 +47,31 @@
prompt
MinimumRecommendedRules.ruleset
-
+
+ bin\Debug45-$(spRuntime)\
+ v4.5
true
- bin\CI-O365\
- DEBUG;TRACE
full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\CI-CSOM2013\
+ false
DEBUG;TRACE
- full
- AnyCPU
prompt
- MinimumRecommendedRules.ruleset
+ 4
+ false
+ bin\Debug45-$(spRuntime)\SPMeta2.Regression.CSOM.Standard.XML
..\..\packages\CsQuery.1.3.4\lib\net40\CsQuery.dll
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2010 - 14.0.4762.1000\CSOM\Microsoft.SharePoint.Client.dll
+ False
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2010 - 14.0.4762.1000\CSOM\Microsoft.SharePoint.Client.Runtime.dll
+
True
..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.dll
@@ -94,38 +97,122 @@
True
..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.Taxonomy.dll
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.WorkflowServices.dll
+ False
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.Publishing.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.DocumentManagement.dll
+ False
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.Runtime.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.dll
+ False
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.Search.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.Publishing.dll
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.Search.Applications.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.Runtime.dll
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.Taxonomy.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.Search.dll
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.WorkflowServices.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.Search.Applications.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.Taxonomy.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.WorkflowServices.dll
+ False
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.DocumentManagement.dll
False
-
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.WorkflowServices.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.WorkflowServices.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Publishing.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Runtime.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Search.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Search.Applications.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Taxonomy.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.DocumentManagement.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.WorkflowServices.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.WorkflowServices.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.Publishing.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.Runtime.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.Search.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.Search.Applications.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.Taxonomy.dll
+
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.WorkflowServices.dll
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.DocumentManagement.dll
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs
index 644c19884..8ff8140a9 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj b/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj
index c217a45b2..c67580285 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj
+++ b/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj
@@ -27,55 +27,32 @@
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- bin\1212\
-
-
- bin\Debug40\
-
-
- true
- bin\Debug45\
- DEBUG;TRACE
- bin\Debug\SPMeta2.Regression.CSOM.XML
- full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
+
+
+ bin\Debug45-$(spRuntime)\
+ v4.5
true
- bin\CI-O365\
- DEBUG;TRACE
full
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\CI-CSOM2013\
+ false
DEBUG;TRACE
- full
- AnyCPU
prompt
- MinimumRecommendedRules.ruleset
+ 4
+ false
+ bin\Debug45-$(spRuntime)\SPMeta2.Regression.CSOM.XML
+
..\..\packages\CsQuery.1.3.4\lib\net40\CsQuery.dll
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.WorkflowServices.dll
+ ..\SPMeta2.Dependencies\SharePoint\SP2010 - 14.0.4762.1000\CSOM\Microsoft.SharePoint.Client.dll
+ False
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2010 - 14.0.4762.1000\CSOM\Microsoft.SharePoint.Client.Runtime.dll
True
@@ -91,13 +68,43 @@
..\SPMeta2.Dependencies\SharePoint\SP2013 - 15.0.4569.1000\CSOM\Microsoft.SharePoint.Client.WorkflowServices.dll
False
-
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.dll
+ False
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.Runtime.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\SP2016 - 16.0.4306.1001\CSOM\Microsoft.SharePoint.Client.WorkflowServices.dll
+ False
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.Runtime.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET45\Microsoft.SharePoint.Client.WorkflowServices.dll
+
+
+ True
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.dll
+
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.dll
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.Runtime.dll
-
+
True
- ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.3912.1204\Microsoft.SharePoint.Client.Runtime.dll
+ ..\SPMeta2.Dependencies\SharePoint\O365 - 16.1.5715.1200\NET40\Microsoft.SharePoint.Client.WorkflowServices.dll
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs
index 56c548355..f6723f957 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs
@@ -10,6 +10,7 @@
using SPMeta2.CSOM.ModelHosts;
using SPMeta2.Services;
using System.Text.RegularExpressions;
+using System;
namespace SPMeta2.Regression.CSOM.Validation
{
@@ -42,6 +43,7 @@ public override void DeployModel(object modelHost, DefinitionBase model)
v => v.Aggregations,
v => v.ViewType,
v => v.IncludeRootFolder,
+ v => v.HtmlSchemaXml,
v => v.ViewData));
context.ExecuteQueryWithTrace();
@@ -111,27 +113,76 @@ public override void DeployModel(object modelHost, DefinitionBase model)
else
assert.SkipProperty(m => m.ViewData);
- if (!string.IsNullOrEmpty(definition.Type))
+ if (definition.Types.Count() == 0)
{
+ assert.SkipProperty(m => m.Types, "Types.Count == 0");
+
+ if (!string.IsNullOrEmpty(definition.Type))
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Type);
+ var dstProp = d.GetExpressionValue(o => o.ViewType);
+
+ var isValid = srcProp.Value.ToString().ToUpper() ==
+ dstProp.Value.ToString().ToUpper();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ assert.SkipProperty(m => m.Type);
+ }
+ else
+ {
+ assert.SkipProperty(m => m.Type, "Types.Count != 0");
+
assert.ShouldBeEqual((p, s, d) =>
{
- var srcProp = s.GetExpressionValue(def => def.Type);
- var dstProp = d.GetExpressionValue(o => o.ViewType);
+ var srcProp = s.GetExpressionValue(def => def.Types);
+ //var dstProp = d.GetExpressionValue(o => o.Type);
- var isValid = srcProp.Value.ToString().ToUpper() ==
- dstProp.Value.ToString().ToUpper();
+ var isValid = false;
+
+ ViewType? srcType = null;
+
+ foreach (var type in s.Types)
+ {
+ var tmpViewType = (ViewType)Enum.Parse(typeof(ViewType), type);
+
+ if (srcType == null)
+ srcType = tmpViewType;
+ else
+ srcType = srcType | tmpViewType;
+ }
+
+ var srcTypeValue = (int)srcType;
+ var dstTypeValue = (int)0;
+
+ // checking if only reccurence set
+ // test designed that way only
+ if (((int)srcTypeValue & (int)(ViewType.Recurrence)) ==
+ (int)ViewType.Recurrence)
+ {
+ // nah, whatever, it works and does the job
+ isValid = d.HtmlSchemaXml.Contains("RecurrenceRowset=\"TRUE\"");
+ }
return new PropertyValidationResult
{
Tag = p.Tag,
Src = srcProp,
- Dst = dstProp,
+ Dst = null,
IsValid = isValid
};
});
}
- else
- assert.SkipProperty(m => m.Type);
assert.SkipProperty(m => m.ViewStyleId, "ViewStyleId unsupported by SP CSOM API yet. Skipping.");
assert.SkipProperty(m => m.TabularView, "TabularView unsupported by SP CSOM API yet. Skipping.");
@@ -228,7 +279,30 @@ public override void DeployModel(object modelHost, DefinitionBase model)
if (string.IsNullOrEmpty(definition.Aggregations))
assert.SkipProperty(m => m.Aggregations, "Aggregations is null or empty. Skipping.");
else
- assert.ShouldBeEqual(m => m.Aggregations, o => o.Aggregations);
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Aggregations);
+ var dstProp = d.GetExpressionValue(ct => ct.Aggregations);
+
+ var isValid = s.Aggregations
+ .Replace("'", string.Empty)
+ .Replace(" ", string.Empty)
+ .Replace("\"", string.Empty) ==
+ d.Aggregations
+ .Replace("'", string.Empty)
+ .Replace(" ", string.Empty)
+ .Replace("\"", string.Empty);
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
assert.ShouldBePartOfIfNotNullOrEmpty(m => m.Url, o => o.ServerRelativeUrl);
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowDefinitionValidator.cs
index cd9a9a1f2..b0d37533d 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowDefinitionValidator.cs
@@ -7,7 +7,8 @@
using SPMeta2.CSOM.ModelHosts;
using SPMeta2.Definitions;
using SPMeta2.Definitions.Base;
-using SPMeta2.Utils;
+using SPMeta2.Utils;
+using SPMeta2.Containers.Assertion;
namespace SPMeta2.Regression.CSOM.Validation
{
@@ -33,10 +34,57 @@ public override void DeployModel(object modelHost, DefinitionBase model)
.ShouldNotBeNull(spObject)
.SkipProperty(m => m.Override, "Override is not supported yet.")
.ShouldBeEqual(m => m.Xaml, o => o.Xaml)
- .ShouldBeEqual(m => m.DisplayName, o => o.DisplayName);
-
-
- // TODO, check Override later
+ .ShouldBeEqual(m => m.DisplayName, o => o.DisplayName);
+
+
+ if (!string.IsNullOrEmpty(definition.RestrictToScope))
+ assert.ShouldBeEqual(m => m.RestrictToScope, o => o.RestrictToScope);
+ else
+ assert.SkipProperty(p => p.RestrictToScope);
+
+ if (!string.IsNullOrEmpty(definition.RestrictToType))
+ assert.ShouldBeEqual(m => m.RestrictToType, o => o.RestrictToType);
+ else
+ assert.SkipProperty(p => p.RestrictToType);
+
+ if (definition.Properties.Count() > 0)
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Properties);
+ var dstProp = d.GetExpressionValue(ct => ct.Properties);
+
+ var isValid = true;
+
+ foreach (var prop in s.Properties)
+ {
+ var propName = prop.Name;
+ var propValue = prop.Value;
+
+ if (!d.Properties.ContainsKey(propName))
+ {
+ isValid = false;
+ }
+
+ if (d.Properties[propName] != propValue)
+ {
+ isValid = false;
+ }
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(p => p.Properties, ".Properties.Count() = 0. Skipping");
+ }
}
}
}
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowSubscriptionDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowSubscriptionDefinitionValidator.cs
index ad7ca6d56..b3c60ac9e 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowSubscriptionDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSP2013WorkflowSubscriptionDefinitionValidator.cs
@@ -167,7 +167,46 @@ private void ValidateWorkflowSubscription(object modelHost,
#endregion
- #endregion
+ #endregion
+
+ if (definition.Properties.Count() > 0)
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Properties);
+ var dstProp = d.GetExpressionValue(ct => ct.PropertyDefinitions);
+
+ var isValid = true;
+
+ foreach (var prop in s.Properties)
+ {
+ var propName = prop.Name;
+ var propValue = prop.Value;
+
+ if (!d.PropertyDefinitions.ContainsKey(propName))
+ {
+ isValid = false;
+ }
+
+ if (d.PropertyDefinitions[propName] != propValue)
+ {
+ isValid = false;
+ }
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(p => p.Properties, ".Properties.Count() = 0. Skipping");
+ }
}
}
}
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWebDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWebDefinitionValidator.cs
index f9ae9066a..edae845c8 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWebDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWebDefinitionValidator.cs
@@ -1,284 +1,339 @@
-using System;
-using System.Linq;
-
-using Microsoft.SharePoint.Client;
-
-using SPMeta2.Containers.Assertion;
-using SPMeta2.CSOM.Extensions;
-using SPMeta2.CSOM.ModelHandlers;
-using SPMeta2.Definitions;
-using SPMeta2.Regression.CSOM.Extensions;
-using SPMeta2.Services;
-using SPMeta2.Utils;
-using System.Text;
-
-namespace SPMeta2.Regression.CSOM.Validation
-{
- public class ClientWebDefinitionValidator : WebModelHandler
- {
- public override void DeployModel(object modelHost, DefinitionBase model)
- {
- var hostClientContext = ExtractHostClientContext(modelHost);
-
- var parentWeb = ExtractWeb(modelHost);
- var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
-
- var currentWebUrl = GetCurrentWebUrl(parentWeb.Context, parentWeb, definition);
- var spObject = GetExistingWeb(hostClientContext.Site, parentWeb, currentWebUrl);
- var context = spObject.Context;
-
- context.Load(spObject,
- w => w.HasUniqueRoleAssignments,
- w => w.Description,
- w => w.Url,
- w => w.Language,
- w => w.WebTemplate,
- w => w.Configuration,
- w => w.Title,
- w => w.Id,
- w => w.AllProperties
- );
-
- context.ExecuteQueryWithTrace();
-
- var assert = ServiceFactory.AssertService
- .NewAssert(definition, spObject)
- .ShouldBeEqual(m => m.Title, o => o.Title)
- .ShouldBeEqual(m => m.LCID, o => o.GetLCID())
- .ShouldBeEqual(m => m.UseUniquePermission, o => o.HasUniqueRoleAssignments);
-
- if (!string.IsNullOrEmpty(definition.WebTemplate))
- {
- assert.ShouldBeEqual(m => m.WebTemplate, o => o.GetWebTemplate());
- assert.SkipProperty(m => m.CustomWebTemplate);
- }
- else
- {
- assert.SkipProperty(m => m.WebTemplate);
- assert.SkipProperty(m => m.CustomWebTemplate);
- }
-
- assert.ShouldBeEqualIfNotNullOrEmpty(m => m.Description, o => o.Description);
-
- assert.ShouldBeEqual((p, s, d) =>
- {
- if (!parentWeb.IsObjectPropertyInstantiated("Url"))
- {
- parentWeb.Context.Load(parentWeb, o => o.Url);
- parentWeb.Context.ExecuteQueryWithTrace();
- }
-
- var srcProp = s.GetExpressionValue(def => def.Url);
- var dstProp = d.GetExpressionValue(ct => ct.Url);
-
- var srcUrl = s.Url;
- var dstUrl = d.Url;
-
- srcUrl = UrlUtility.RemoveStartingSlash(srcUrl);
-
- var dstSubUrl = dstUrl.Replace(parentWeb.Url + "/", string.Empty);
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = srcUrl == dstSubUrl
- };
- });
-
+using System;
+using System.Linq;
+
+using Microsoft.SharePoint.Client;
+
+using SPMeta2.Containers.Assertion;
+using SPMeta2.CSOM.Extensions;
+using SPMeta2.CSOM.ModelHandlers;
+using SPMeta2.Definitions;
+using SPMeta2.Regression.CSOM.Extensions;
+using SPMeta2.Services;
+using SPMeta2.Utils;
+using System.Text;
+
+namespace SPMeta2.Regression.CSOM.Validation
+{
+ public class ClientWebDefinitionValidator : WebModelHandler
+ {
+ public override void DeployModel(object modelHost, DefinitionBase model)
+ {
+ var hostClientContext = ExtractHostClientContext(modelHost);
+
+ var parentWeb = ExtractWeb(modelHost);
+ var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+
+ var currentWebUrl = GetCurrentWebUrl(parentWeb.Context, parentWeb, definition);
+ var spObject = GetExistingWeb(hostClientContext.Site, parentWeb, currentWebUrl);
+ var context = spObject.Context;
+
+ context.Load(spObject,
+ w => w.HasUniqueRoleAssignments,
+ w => w.Description,
+ w => w.Url,
+ w => w.Language,
+ w => w.WebTemplate,
+ w => w.Configuration,
+ w => w.Title,
+ w => w.Id,
+ w => w.AllProperties
+ );
+
+ context.ExecuteQueryWithTrace();
+
+ var assert = ServiceFactory.AssertService
+ .NewAssert(definition, spObject)
+ .ShouldBeEqual(m => m.Title, o => o.Title)
+ .ShouldBeEqual(m => m.LCID, o => o.GetLCID())
+ .ShouldBeEqual(m => m.UseUniquePermission, o => o.HasUniqueRoleAssignments);
+
+ if (!string.IsNullOrEmpty(definition.WebTemplate))
+ {
+ assert.ShouldBeEqual(m => m.WebTemplate, o => o.GetWebTemplate());
+ assert.SkipProperty(m => m.CustomWebTemplate);
+ }
+ else
+ {
+ assert.SkipProperty(m => m.WebTemplate);
+ assert.SkipProperty(m => m.CustomWebTemplate);
+ }
+
+ assert.ShouldBeEqualIfNotNullOrEmpty(m => m.Description, o => o.Description);
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ if (!parentWeb.IsObjectPropertyInstantiated("Url"))
+ {
+ parentWeb.Context.Load(parentWeb, o => o.Url);
+ parentWeb.Context.ExecuteQueryWithTrace();
+ }
+
+ var srcProp = s.GetExpressionValue(def => def.Url);
+ var dstProp = d.GetExpressionValue(ct => ct.Url);
+
+ var srcUrl = s.Url;
+ var dstUrl = d.Url;
+
+ srcUrl = UrlUtility.RemoveStartingSlash(srcUrl);
+
+ var dstSubUrl = dstUrl.Replace(parentWeb.Url + "/", string.Empty);
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = srcUrl == dstSubUrl
+ };
+ });
+
var supportsAlternateCssAndSiteImageUrl = ReflectionUtils.HasProperties(spObject, new[]
{
"AlternateCssUrl",
"SiteLogoUrl"
- });
-
- if (supportsAlternateCssAndSiteImageUrl)
- {
- if (!string.IsNullOrEmpty(definition.AlternateCssUrl))
- {
- var alternateCssUrl = ReflectionUtils.GetPropertyValue(spObject, "AlternateCssUrl");
-
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.AlternateCssUrl);
- var isValid = true;
-
- isValid = s.AlternateCssUrl.ToUpper().EndsWith(alternateCssUrl.ToString().ToUpper());
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.AlternateCssUrl);
- }
-
- if (!string.IsNullOrEmpty(definition.SiteLogoUrl))
- {
- var siteLogoUrl = ReflectionUtils.GetPropertyValue(spObject, "SiteLogoUrl");
-
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.SiteLogoUrl);
-
- var isValid = s.SiteLogoUrl.ToUpper().EndsWith(siteLogoUrl.ToString().ToUpper());
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.SiteLogoUrl);
- }
- }
- else
- {
- TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
- "CSOM runtime doesn't have Web.AlternateCssUrl and Web.SiteLogoUrl methods support. Skipping validation.");
-
- assert.SkipProperty(m => m.AlternateCssUrl, "AlternateCssUrl is null or empty. Skipping.");
- assert.SkipProperty(m => m.SiteLogoUrl, "SiteLogoUrl is null or empty. Skipping.");
- }
-
+ });
+
+ if (supportsAlternateCssAndSiteImageUrl)
+ {
+ // also check for MembersCanShare / RequestAccessEmail
+ if (definition.MembersCanShare.HasValue)
+ {
+ var membersCanShare = ConvertUtils.ToBool(ReflectionUtils.GetPropertyValue(spObject, "MembersCanShare")).Value;
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.MembersCanShare);
+ var isValid = true;
+
+ isValid = s.MembersCanShare.Value == membersCanShare;
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.MembersCanShare);
+ }
+
+ if (!string.IsNullOrEmpty(definition.RequestAccessEmail))
+ {
+ var requestAccessEmail = ReflectionUtils.GetPropertyValue(spObject, "RequestAccessEmail");
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.RequestAccessEmail);
+ var isValid = true;
+
+ isValid = s.RequestAccessEmail.ToUpper() == requestAccessEmail.ToString().ToUpper();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.RequestAccessEmail);
+ }
+
+
+ if (!string.IsNullOrEmpty(definition.AlternateCssUrl))
+ {
+ var alternateCssUrl = ReflectionUtils.GetPropertyValue(spObject, "AlternateCssUrl");
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.AlternateCssUrl);
+ var isValid = true;
+
+ isValid = s.AlternateCssUrl.ToUpper().EndsWith(alternateCssUrl.ToString().ToUpper());
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.AlternateCssUrl);
+ }
+
+ if (!string.IsNullOrEmpty(definition.SiteLogoUrl))
+ {
+ var siteLogoUrl = ReflectionUtils.GetPropertyValue(spObject, "SiteLogoUrl");
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.SiteLogoUrl);
+
+ var isValid = s.SiteLogoUrl.ToUpper().EndsWith(siteLogoUrl.ToString().ToUpper());
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.SiteLogoUrl);
+ }
+ }
+ else
+ {
+ TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
+ "CSOM runtime doesn't have Web.AlternateCssUrl and Web.SiteLogoUrl methods support. Skipping validation.");
+
+ assert.SkipProperty(m => m.AlternateCssUrl, "AlternateCssUrl is null or empty. Skipping.");
+ assert.SkipProperty(m => m.SiteLogoUrl, "SiteLogoUrl is null or empty. Skipping.");
+
+ assert.SkipProperty(m => m.MembersCanShare, "SiteLogoUrl is null or empty. Skipping.");
+ assert.SkipProperty(m => m.RequestAccessEmail, "SiteLogoUrl is null or empty. Skipping.");
+ }
+
var supportsLocalization = ReflectionUtils.HasProperties(spObject, new[]
{
"TitleResource", "DescriptionResource"
- });
-
- if (supportsLocalization)
- {
- if (definition.TitleResource.Any())
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.TitleResource);
- var isValid = true;
-
- foreach (var userResource in s.TitleResource)
- {
- var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
- var resourceObject = ReflectionUtils.GetPropertyValue(spObject, "TitleResource");
-
- var value = ReflectionUtils.GetMethod(resourceObject, "GetValueForUICulture")
- .Invoke(resourceObject, new[] { culture.Name }) as ClientResult;
-
- context.ExecuteQuery();
-
- isValid = userResource.Value == value.Value;
-
- if (!isValid)
- break;
- }
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.TitleResource, "TitleResource is NULL or empty. Skipping.");
- }
-
- if (definition.DescriptionResource.Any())
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.DescriptionResource);
- var isValid = true;
-
- foreach (var userResource in s.DescriptionResource)
- {
- var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
- var resourceObject = ReflectionUtils.GetPropertyValue(spObject, "DescriptionResource");
-
- var value = ReflectionUtils.GetMethod(resourceObject, "GetValueForUICulture")
- .Invoke(resourceObject, new[] { culture.Name }) as ClientResult;
-
- context.ExecuteQuery();
-
- isValid = userResource.Value == value.Value;
-
- if (!isValid)
- break;
- }
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.DescriptionResource, "DescriptionResource is NULL or empty. Skipping.");
- }
- }
- else
- {
- TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
- "CSOM runtime doesn't have Web.TitleResource and Web.DescriptionResource() methods support. Skipping validation.");
-
- assert.SkipProperty(m => m.TitleResource, "TitleResource is null or empty. Skipping.");
- assert.SkipProperty(m => m.DescriptionResource, "DescriptionResource is null or empty. Skipping.");
- }
-
- if (definition.IndexedPropertyKeys.Any())
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.IndexedPropertyKeys);
-
- var isValid = false;
-
- if (d.AllProperties.FieldValues.ContainsKey("vti_indexedpropertykeys"))
- {
- // check props, TODO
-
- // check vti_indexedpropertykeys
- var indexedPropertyKeys = d.AllProperties["vti_indexedpropertykeys"]
- .ToString()
- .Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
- .Select(es => Encoding.Unicode.GetString(System.Convert.FromBase64String(es)));
-
- // Search if any indexPropertyKey from definition is not in WebModel
- var differentKeys = s.IndexedPropertyKeys.Select(o => o.Name)
- .Except(indexedPropertyKeys);
-
- isValid = !differentKeys.Any();
- }
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- assert.SkipProperty(m => m.IndexedPropertyKeys, "IndexedPropertyKeys is NULL or empty. Skipping.");
- }
- }
-}
+ });
+
+ if (supportsLocalization)
+ {
+ if (definition.TitleResource.Any())
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.TitleResource);
+ var isValid = true;
+
+ foreach (var userResource in s.TitleResource)
+ {
+ var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
+ var resourceObject = ReflectionUtils.GetPropertyValue(spObject, "TitleResource");
+
+ var value = ReflectionUtils.GetMethod(resourceObject, "GetValueForUICulture")
+ .Invoke(resourceObject, new[] { culture.Name }) as ClientResult;
+
+ context.ExecuteQuery();
+
+ isValid = userResource.Value == value.Value;
+
+ if (!isValid)
+ break;
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.TitleResource, "TitleResource is NULL or empty. Skipping.");
+ }
+
+ if (definition.DescriptionResource.Any())
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.DescriptionResource);
+ var isValid = true;
+
+ foreach (var userResource in s.DescriptionResource)
+ {
+ var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
+ var resourceObject = ReflectionUtils.GetPropertyValue(spObject, "DescriptionResource");
+
+ var value = ReflectionUtils.GetMethod(resourceObject, "GetValueForUICulture")
+ .Invoke(resourceObject, new[] { culture.Name }) as ClientResult;
+
+ context.ExecuteQuery();
+
+ isValid = userResource.Value == value.Value;
+
+ if (!isValid)
+ break;
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.DescriptionResource, "DescriptionResource is NULL or empty. Skipping.");
+ }
+ }
+ else
+ {
+ TraceService.Critical((int)LogEventId.ModelProvisionCoreCall,
+ "CSOM runtime doesn't have Web.TitleResource and Web.DescriptionResource() methods support. Skipping validation.");
+
+ assert.SkipProperty(m => m.TitleResource, "TitleResource is null or empty. Skipping.");
+ assert.SkipProperty(m => m.DescriptionResource, "DescriptionResource is null or empty. Skipping.");
+ }
+
+ if (definition.IndexedPropertyKeys.Any())
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.IndexedPropertyKeys);
+
+ var isValid = false;
+
+ if (d.AllProperties.FieldValues.ContainsKey("vti_indexedpropertykeys"))
+ {
+ // check props, TODO
+
+ // check vti_indexedpropertykeys
+ var indexedPropertyKeys = d.AllProperties["vti_indexedpropertykeys"]
+ .ToString()
+ .Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
+ .Select(es => Encoding.Unicode.GetString(System.Convert.FromBase64String(es)));
+
+ // Search if any indexPropertyKey from definition is not in WebModel
+ var differentKeys = s.IndexedPropertyKeys.Select(o => o.Name)
+ .Except(indexedPropertyKeys);
+
+ isValid = !differentKeys.Any();
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ assert.SkipProperty(m => m.IndexedPropertyKeys, "IndexedPropertyKeys is NULL or empty. Skipping.");
+ }
+ }
+}
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/ClientWebpartPresenceOnPageDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/ClientWebpartPresenceOnPageDefinitionValidator.cs
index 24a0de7f1..b756f1aac 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/ClientWebpartPresenceOnPageDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/ClientWebpartPresenceOnPageDefinitionValidator.cs
@@ -45,7 +45,7 @@ DefinitionBase definitionBase
var isValid = true;
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
trace.WriteLine(string.Format("Checking web part presence on the page:[{0}]", pageUrl));
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs
index ef961a68c..5b81055bf 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs
@@ -40,7 +40,7 @@ protected override void ValidateHtmlPage(File file, string pageUrl, string pageC
var isValid = true;
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
trace.WriteLine(string.Format("Checking InitGridFromView presence:[{0}]", pageUrl));
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs
index e39d0728d..0af80c4a2 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs
@@ -1,89 +1,93 @@
-using System;
-using System.Linq;
-using Microsoft.SharePoint.Client;
-using SPMeta2.Containers.Assertion;
-using SPMeta2.Definitions;
-using SPMeta2.Definitions.Fields;
-using SPMeta2.Regression.CSOM.Utils;
-using SPMeta2.Utils;
-
-namespace SPMeta2.Regression.CSOM.Validation.Fields
-{
- public class CalculatedFieldDefinitionValidator : ClientFieldDefinitionValidator
- {
- public override Type TargetType
- {
- get
- {
- return typeof(CalculatedFieldDefinition);
- }
- }
-
- public override void DeployModel(object modelHost, DefinitionBase model)
- {
- var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
- var spObject = GetField(modelHost, definition);
-
- var assert = ServiceFactory.AssertService.NewAssert(model, definition, spObject);
-
- ValidateField(assert, spObject, definition);
-
- var typedField = spObject.Context.CastTo(spObject);
-
- var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull());
- var typedFieldAssert = ServiceFactory.AssertService.NewAssert(model, typedDefinition, typedField);
-
- typedFieldAssert.ShouldBeEqual(m => m.CurrencyLocaleId, o => o.GetCurrencyLocaleId());
- typedFieldAssert.ShouldBeEqual(m => m.DateFormat, o => o.GetDateFormatString());
-
- typedFieldAssert.ShouldBeEqual(m => m.OutputType, o => o.GetOutputType());
- //typedFieldAssert.ShouldBeEqual(m => m.ShowAsPercentage, o => o.GetShowAsPercentage());
- typedFieldAssert.ShouldBeEqual(m => m.DisplayFormat, o => o.GetDisplayFormatString());
-
- if (typedDefinition.ShowAsPercentage.HasValue)
- typedFieldAssert.ShouldBeEqual(m => m.ShowAsPercentage, o => o.GetShowAsPercentage());
- else
- typedFieldAssert.SkipProperty(m => m.ShowAsPercentage, "ShowAsPercentage is NULL. Skipping.");
-
-
- // formula
- if (!string.IsNullOrEmpty(typedDefinition.Formula))
- typedFieldAssert.ShouldBeEqual(m => m.Formula, o => o.Formula);
- else
- typedFieldAssert.SkipProperty(m => m.Formula);
-
- // field refs
- if (typedDefinition.FieldReferences.Count > 0)
- {
- var hasFieldRefs = true;
-
- foreach (var dstFieldRef in typedField.GetFieldReferences())
- {
- if (typedDefinition.FieldReferences.FirstOrDefault(c => c.ToUpper() == dstFieldRef.ToUpper()) == null)
- {
- hasFieldRefs = false;
- }
- }
-
- typedFieldAssert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(m => m.FieldReferences);
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = hasFieldRefs == true
- };
- });
- }
- else
- {
- typedFieldAssert.SkipProperty(m => m.FieldReferences, "FieldReferences.Count == 0. Skipping.");
- }
- }
- }
-
-
-}
+using System;
+using System.Linq;
+using Microsoft.SharePoint.Client;
+using SPMeta2.Containers.Assertion;
+using SPMeta2.Definitions;
+using SPMeta2.Definitions.Fields;
+using SPMeta2.Regression.CSOM.Utils;
+using SPMeta2.Utils;
+
+namespace SPMeta2.Regression.CSOM.Validation.Fields
+{
+ public class CalculatedFieldDefinitionValidator : ClientFieldDefinitionValidator
+ {
+ public override Type TargetType
+ {
+ get
+ {
+ return typeof(CalculatedFieldDefinition);
+ }
+ }
+
+ public override void DeployModel(object modelHost, DefinitionBase model)
+ {
+ var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+ var spObject = GetField(modelHost, definition);
+
+ var assert = ServiceFactory.AssertService.NewAssert(model, definition, spObject);
+
+ ValidateField(assert, spObject, definition);
+
+ var typedField = spObject.Context.CastTo(spObject);
+
+ var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+ var typedFieldAssert = ServiceFactory.AssertService.NewAssert(model, typedDefinition, typedField);
+
+ typedFieldAssert.ShouldBeEqual(m => m.CurrencyLocaleId, o => o.GetCurrencyLocaleId());
+ typedFieldAssert.ShouldBeEqual(m => m.DateFormat, o => o.GetDateFormatString());
+
+ typedFieldAssert.ShouldBeEqual(m => m.OutputType, o => o.GetOutputType());
+ //typedFieldAssert.ShouldBeEqual(m => m.ShowAsPercentage, o => o.GetShowAsPercentage());
+
+ if (!string.IsNullOrEmpty(typedDefinition.DisplayFormat))
+ typedFieldAssert.ShouldBeEqual(m => m.DisplayFormat, o => o.GetDisplayFormatString());
+ else
+ typedFieldAssert.SkipProperty(m => m.DisplayFormat, "DisplayFormat is NULL. Skipping.");
+
+ if (typedDefinition.ShowAsPercentage.HasValue)
+ typedFieldAssert.ShouldBeEqual(m => m.ShowAsPercentage, o => o.GetShowAsPercentage());
+ else
+ typedFieldAssert.SkipProperty(m => m.ShowAsPercentage, "ShowAsPercentage is NULL. Skipping.");
+
+
+ // formula
+ if (!string.IsNullOrEmpty(typedDefinition.Formula))
+ typedFieldAssert.ShouldBeEqual(m => m.Formula, o => o.Formula);
+ else
+ typedFieldAssert.SkipProperty(m => m.Formula);
+
+ // field refs
+ if (typedDefinition.FieldReferences.Count > 0)
+ {
+ var hasFieldRefs = true;
+
+ foreach (var dstFieldRef in typedField.GetFieldReferences())
+ {
+ if (typedDefinition.FieldReferences.FirstOrDefault(c => c.ToUpper() == dstFieldRef.ToUpper()) == null)
+ {
+ hasFieldRefs = false;
+ }
+ }
+
+ typedFieldAssert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(m => m.FieldReferences);
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = hasFieldRefs == true
+ };
+ });
+ }
+ else
+ {
+ typedFieldAssert.SkipProperty(m => m.FieldReferences, "FieldReferences.Count == 0. Skipping.");
+ }
+ }
+ }
+
+
+}
diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/NumberFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/NumberFieldDefinitionValidator.cs
index 0ecd2a3b3..e32069496 100644
--- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/NumberFieldDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/NumberFieldDefinitionValidator.cs
@@ -1,45 +1,47 @@
-using System;
-using Microsoft.SharePoint.Client;
-using SPMeta2.Definitions;
-using SPMeta2.Definitions.Fields;
-using SPMeta2.Enumerations;
-using SPMeta2.Regression.CSOM.Utils;
-using SPMeta2.Utils;
-
-namespace SPMeta2.Regression.CSOM.Validation.Fields
-{
- public class NumberFieldDefinitionValidator : ClientFieldDefinitionValidator
- {
- public override Type TargetType
- {
- get
- {
- return typeof(NumberFieldDefinition);
- }
- }
-
- public override void DeployModel(object modelHost, DefinitionBase model)
- {
- var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
- var spObject = GetField(modelHost, definition);
-
- var assert = ServiceFactory.AssertService.NewAssert(model, definition, spObject);
-
- ValidateField(assert, spObject, definition);
-
- var textField = spObject.Context.CastTo(spObject);
- var textDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull());
-
- var typedFieldAssert = ServiceFactory.AssertService.NewAssert(model, textDefinition, textField);
-
- typedFieldAssert.ShouldBeEqual(m => m.MaximumValue, o => o.MaximumValue);
- typedFieldAssert.ShouldBeEqual(m => m.MinimumValue, o => o.MinimumValue);
- typedFieldAssert.ShouldBeEqual(m => m.ShowAsPercentage, o => o.GetShowAsPercentage());
-
- if (!string.IsNullOrEmpty(textDefinition.DisplayFormat))
- typedFieldAssert.ShouldBeEqual(m => m.DisplayFormat, o => o.GetDecimalsAsString());
- else
- typedFieldAssert.SkipProperty(m => m.DisplayFormat, "DisplayFormat is null or empty. Skipping.");
- }
- }
-}
+using System;
+using Microsoft.SharePoint.Client;
+using SPMeta2.Definitions;
+using SPMeta2.Definitions.Fields;
+using SPMeta2.Enumerations;
+using SPMeta2.Regression.CSOM.Utils;
+using SPMeta2.Utils;
+
+namespace SPMeta2.Regression.CSOM.Validation.Fields
+{
+ public class NumberFieldDefinitionValidator : ClientFieldDefinitionValidator
+ {
+ public override Type TargetType
+ {
+ get
+ {
+ return typeof(NumberFieldDefinition);
+ }
+ }
+
+ public override void DeployModel(object modelHost, DefinitionBase model)
+ {
+ var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+ var spObject = GetField(modelHost, definition);
+
+ var assert = ServiceFactory.AssertService.NewAssert(model, definition, spObject);
+
+ ValidateField(assert, spObject, definition);
+
+ var textField = spObject.Context.CastTo(spObject);
+ var textDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+
+ var typedFieldAssert = ServiceFactory.AssertService.NewAssert(model, textDefinition, textField);
+
+ typedFieldAssert.ShouldBeEqual(m => m.MaximumValue, o => o.MaximumValue);
+ typedFieldAssert.ShouldBeEqual(m => m.MinimumValue, o => o.MinimumValue);
+ typedFieldAssert.ShouldBeEqual(m => m.ShowAsPercentage, o => o.GetShowAsPercentage());
+
+ typedFieldAssert.SkipProperty(m => m.DisplayFormat, "Skipping validation as this field is unchangable in CSOM API.");
+
+ //if (!string.IsNullOrEmpty(textDefinition.DisplayFormat))
+ // typedFieldAssert.ShouldBeEqual(m => m.DisplayFormat, o => o.GetDecimalsAsString());
+ //else
+ // typedFieldAssert.SkipProperty(m => m.DisplayFormat, "DisplayFormat is null or empty. Skipping.");
+ }
+ }
+}
diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Build/BuildBaselineTests.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Build/BuildBaselineTests.cs
index c0a51ce7a..4f00672be 100644
--- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Build/BuildBaselineTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Build/BuildBaselineTests.cs
@@ -12,6 +12,8 @@
using SPMeta2.Services.Impl;
using SPMeta2.Standard.Definitions.Fields;
using SPMeta2.Utils;
+using SPMeta2.Regression.Utils;
+using System.IO;
namespace SPMeta2.Regression.Impl.Tests.Impl.Build
{
@@ -40,7 +42,7 @@ public BuildBaseline()
[TestClass]
public class BuildBaselineTests
{
-
+
[TestMethod]
[TestCategory("CI.Core")]
@@ -77,16 +79,21 @@ public void Create_BuildBaseline()
var content = xmlService.Serialize(result);
- Trace.WriteLine(content);
+ RegressionUtils.WriteLine(content);
var paths = new[]
{
- fileName,
- "../../../SPMeta2.Build/" + fileName
+ System.IO.Path.GetFullPath(fileName),
+ System.IO.Path.GetFullPath("../../../SPMeta2.Build/" + fileName)
};
foreach (var path in paths)
+ {
+ var dirPath = Path.GetDirectoryName(path);
+ Directory.CreateDirectory(dirPath);
+
System.IO.File.WriteAllText(path, content);
+ }
}
private BuildBaseline BuildBaselineFromAssembly(Assembly assembly)
@@ -106,20 +113,20 @@ private BuildBaseline BuildBaselineFromAssembly(Assembly assembly)
.Select(t => t.AssemblyQualifiedName)
.ToList();
- Trace.WriteLine(string.Format("AssemblyFullName:[{0}]", result.AssemblyFullName));
- Trace.WriteLine(string.Format("DefinitionTypeFullNames:[{0}]", result.DefinitionTypeFullNames.Count));
- Trace.WriteLine(string.Format("ModelHandlerTypeFullNames:[{0}]", result.ModelHandlerTypeFullNames.Count));
+ RegressionUtils.WriteLine(string.Format("AssemblyFullName:[{0}]", result.AssemblyFullName));
+ RegressionUtils.WriteLine(string.Format("DefinitionTypeFullNames:[{0}]", result.DefinitionTypeFullNames.Count));
+ RegressionUtils.WriteLine(string.Format("ModelHandlerTypeFullNames:[{0}]", result.ModelHandlerTypeFullNames.Count));
- Trace.WriteLine("Definitions:");
+ RegressionUtils.WriteLine("Definitions:");
foreach (var name in result.DefinitionTypeFullNames)
- Trace.WriteLine(" " + name);
+ RegressionUtils.WriteLine(" " + name);
- Trace.WriteLine("Model handlers:");
+ RegressionUtils.WriteLine("Model handlers:");
foreach (var name in result.ModelHandlerTypeFullNames)
- Trace.WriteLine(" " + name);
+ RegressionUtils.WriteLine(" " + name);
- Trace.WriteLine(string.Empty);
- Trace.WriteLine(string.Empty);
+ RegressionUtils.WriteLine(string.Empty);
+ RegressionUtils.WriteLine(string.Empty);
return result;
}
diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/Base/TokenReplacementServiceTestBase.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/Base/TokenReplacementServiceTestBase.cs
index 2584b3d2f..c11e5d871 100644
--- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/Base/TokenReplacementServiceTestBase.cs
+++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/Base/TokenReplacementServiceTestBase.cs
@@ -7,6 +7,7 @@
using Microsoft.SharePoint.Client;
using SPMeta2.Services;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Impl.Tests.Impl.Services.Base
{
@@ -27,7 +28,7 @@ protected bool HasAllTestsForTokens(string methodPrefix, IEnumerable
methodPrefix);
var method = methods.FirstOrDefault(m => m.Name.ToUpper() == methodName.ToUpper());
- Trace.WriteLine(methodName + " : " + (method != null));
+ RegressionUtils.WriteLine(methodName + " : " + (method != null));
if (method == null)
isValid = false;
@@ -59,7 +60,7 @@ protected bool ShouldPass(string message, object context, string token, string e
{
var result = true;
- Trace.WriteLine(message);
+ RegressionUtils.WriteLine(message);
var valueResult = Service.ReplaceTokens(new TokenReplacementContext
{
@@ -69,7 +70,7 @@ protected bool ShouldPass(string message, object context, string token, string e
result = expectedUrl.ToUpper() == valueResult.Value.ToUpper();
- Trace.WriteLine(string.Format("[{0}] - [{1}] - token:[{2}] expected value:[{3}] replaced value:[{4}]",
+ RegressionUtils.WriteLine(string.Format("[{0}] - [{1}] - token:[{2}] expected value:[{3}] replaced value:[{4}]",
new object[]
{
message,
diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/CSOM/CSOMTokenReplacementServiceTests.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/CSOM/CSOMTokenReplacementServiceTests.cs
index e4c61aaf8..6fe5d17b5 100644
--- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/CSOM/CSOMTokenReplacementServiceTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/CSOM/CSOMTokenReplacementServiceTests.cs
@@ -126,6 +126,44 @@ public void CSOMTokenReplacementService_Can_Replace_Site_Token()
Assert.IsTrue(isValid);
}
+ [TestMethod]
+ [TestCategory("Regression.Impl.CSOMTokenReplacementService")]
+ public void CSOMTokenReplacementService_Should_Not_ChangeNonTokenedUrl()
+ {
+ var isValid = true;
+ var runner = new CSOMProvisionRunner();
+
+ runner.SiteUrls.ForEach(siteUrl =>
+ {
+ runner.WithCSOMContext(siteUrl, context =>
+ {
+ PreloadProperties(context);
+
+ var site = context.Site;
+
+ var originalFullUrl = site.Url;
+ var originalSiteRelativeUrl = site.ServerRelativeUrl;
+
+ var originalValueResult = Service.ReplaceTokens(new TokenReplacementContext
+ {
+ Value = originalFullUrl,
+ Context = context
+ });
+
+ var originalSiteRelativeResult = Service.ReplaceTokens(new TokenReplacementContext
+ {
+ Value = originalSiteRelativeUrl,
+ Context = context
+ });
+
+ Assert.AreEqual(originalFullUrl, originalValueResult.Value);
+ Assert.AreEqual(originalSiteRelativeUrl, originalSiteRelativeResult.Value);
+ });
+ });
+
+ Assert.IsTrue(isValid);
+ }
+
[TestMethod]
[TestCategory("Regression.Impl.CSOMTokenReplacementService")]
public void CSOMTokenReplacementService_Should_Support_ClientContext()
@@ -218,12 +256,24 @@ private static void PreloadProperties(ClientContext clientContext)
needQuery = true;
}
+ if (!clientContext.Site.IsPropertyAvailable("Url"))
+ {
+ clientContext.Load(clientContext.Site, s => s.Url);
+ needQuery = true;
+ }
+
if (!clientContext.Web.IsPropertyAvailable("ServerRelativeUrl"))
{
clientContext.Load(clientContext.Web, w => w.ServerRelativeUrl);
needQuery = true;
}
+ if (!clientContext.Web.IsPropertyAvailable("Url"))
+ {
+ clientContext.Load(clientContext.Web, w => w.Url);
+ needQuery = true;
+ }
+
if (needQuery)
{
clientContext.ExecuteQueryWithTrace();
diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/SSOM/SSOMTokenReplacementServiceTests.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/SSOM/SSOMTokenReplacementServiceTests.cs
index 12c650f53..1aa171ed8 100644
--- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/SSOM/SSOMTokenReplacementServiceTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/SSOM/SSOMTokenReplacementServiceTests.cs
@@ -149,6 +149,40 @@ public void SSOMTokenReplacementService_Can_Replace_Site_Token()
Assert.IsTrue(isValid);
}
+ [TestMethod]
+ [TestCategory("Regression.Impl.SSOMTokenReplacementService")]
+ public void SSOMTokenReplacementService_Should_Not_ChangeNonTokenedUrl()
+ {
+ var isValid = true;
+ var runner = new SSOMProvisionRunner();
+
+ runner.SiteUrls.ForEach(siteUrl =>
+ {
+ runner.WithSSOMSiteAndWebContext(siteUrl, (site, web) =>
+ {
+ var originalFullUrl = site.Url;
+ var originalSiteRelativeUrl = site.ServerRelativeUrl;
+
+ var originalValueResult = Service.ReplaceTokens(new TokenReplacementContext
+ {
+ Value = originalFullUrl,
+ Context = site
+ });
+
+ var originalSiteRelativeResult = Service.ReplaceTokens(new TokenReplacementContext
+ {
+ Value = originalSiteRelativeUrl,
+ Context = site
+ });
+
+ Assert.AreEqual(originalFullUrl, originalValueResult.Value);
+ Assert.AreEqual(originalSiteRelativeUrl, originalSiteRelativeResult.Value);
+ });
+ });
+
+ Assert.IsTrue(isValid);
+ }
+
#endregion
}
}
diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/ValidationServiceTests.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/ValidationServiceTests.cs
index 6c8ba48c5..04c8ddaf6 100644
--- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/ValidationServiceTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/ValidationServiceTests.cs
@@ -9,7 +9,8 @@
using SPMeta2.Services.Impl.Validation;
using SPMeta2.SSOM.Services;
using SPMeta2.SSOM.Standard.Services;
-using SPMeta2.Utils;
+using SPMeta2.Utils;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Impl.Tests.Impl.Services
{
@@ -48,10 +49,10 @@ public void All_Services_Should_Have_Metadata()
foreach (var validationServiceType in validationServiceTypes)
{
- var service = Activator.CreateInstance(validationServiceType) as PreDeploymentValidationServiceBase;
-
- Trace.WriteLine(service.Title);
- Trace.WriteLine(service.Description);
+ var service = Activator.CreateInstance(validationServiceType) as PreDeploymentValidationServiceBase;
+
+ RegressionUtils.WriteLine(service.Title);
+ RegressionUtils.WriteLine(service.Description);
Assert.IsNotNull(service);
diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs
index d4b011d59..9170ec3f7 100644
--- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj b/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj
index 41814ae77..567d385b6 100644
--- a/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj
+++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj
@@ -269,6 +269,10 @@
{2DA71A5B-C039-4A2E-9985-91D6501F293C}
SPMeta2.Regression.Tests
+
+ {0de538c9-1723-46b1-90f8-5dc67c56d7dd}
+ SPMeta2.Regression
+
{7D095A0D-0BDE-446D-8093-13E5685F1D3C}
SPMeta2.SSOM.Standard
diff --git a/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs
index 424557333..1ea95bb8c 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs
index 679745665..f6df0545c 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.17040.0900")]
+[assembly: AssemblyFileVersion("1.2.17057.1048")]
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/WebpartPresenceOnPageDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/WebpartPresenceOnPageDefinitionValidator.cs
index 13aa8a42c..12e714841 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/WebpartPresenceOnPageDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/WebpartPresenceOnPageDefinitionValidator.cs
@@ -44,7 +44,7 @@ DefinitionBase definitionBase
var isValid = true;
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
trace.WriteLine(string.Format("Checking web part presence on the page:[{0}]", pageUrl));
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs
index 45f76d5ad..70e1691d9 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Extended/XsltListViewWebPartGridModePresenceValidator.cs
@@ -33,7 +33,7 @@ protected override void ValidateHtmlPage(SPFile file, string pageUrl, string pag
var isValid = true;
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
trace.WriteLine(string.Format("Checking InitGridFromView presence:[{0}]", pageUrl));
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs
index f508e886e..fd36ab75a 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/CalculatedFieldDefinitionValidator.cs
@@ -50,7 +50,7 @@ public override void DeployModel(object modelHost, DefinitionBase model)
else
typedFieldAssert.SkipProperty(m => m.Formula);
- TraceUtils.WithScope(s =>
+ IndentableTrace.WithScope(s =>
{
s.WriteLine(string.Format("Formula: Src:[{0}] Dst:[{1}]", typedDefinition.Formula, typedField.Formula));
});
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs
index 736ad0090..d1b6129f5 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs
@@ -1,322 +1,394 @@
-using System.Linq;
-using System.Xml.Linq;
-
-using Microsoft.SharePoint;
-
-using SPMeta2.Containers.Assertion;
-using SPMeta2.Definitions;
-using SPMeta2.Regression.SSOM.Extensions;
-using SPMeta2.SSOM.Extensions;
-using SPMeta2.SSOM.ModelHandlers;
-using SPMeta2.Utils;
+using System.Linq;
+using System.Xml.Linq;
+
+using Microsoft.SharePoint;
+
+using SPMeta2.Containers.Assertion;
+using SPMeta2.Definitions;
+using SPMeta2.Regression.SSOM.Extensions;
+using SPMeta2.SSOM.Extensions;
+using SPMeta2.SSOM.ModelHandlers;
+using SPMeta2.Utils;
using SPMeta2.SSOM.ModelHosts;
-using System.Text.RegularExpressions;
-
-namespace SPMeta2.Regression.SSOM.Validation
-{
- public class ListViewDefinitionValidator : ListViewModelHandler
- {
- public override void DeployModel(object modelHost, DefinitionBase model)
- {
- var listModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull());
- var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
-
- var list = listModelHost.HostList;
- var spObject = list.Views.FindByName(definition.Title);
-
- var assert = ServiceFactory.AssertService
- .NewAssert(definition, spObject)
- .ShouldBeEqual(m => m.Title, o => o.Title)
- .ShouldBeEqual(m => m.IsDefault, o => o.IsDefaul())
- .ShouldBeEqual(m => m.Hidden, o => o.Hidden)
- .ShouldBeEqual(m => m.RowLimit, o => (int)o.RowLimit)
- .ShouldBeEqual(m => m.IsPaged, o => o.Paged);
-
-
- if (definition.InlineEdit.HasValue)
- assert.ShouldBeEqual(m => m.InlineEdit.ToString().ToLower(), o => o.InlineEdit.ToLower());
- else
- assert.SkipProperty(m => m.InlineEdit);
-
-
- if (!string.IsNullOrEmpty(definition.Scope))
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.Scope);
- var dstProp = d.GetExpressionValue(o => o.Scope);
-
- var scopeValue = ListViewScopeTypesConvertService.NormilizeValueToSSOMType(definition.Scope);
-
- var isValid = scopeValue == d.Scope.ToString();
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.Scope);
- }
-
- if (!string.IsNullOrEmpty(definition.Query))
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.Query);
- var dstProp = d.GetExpressionValue(o => o.Query);
-
- var srcViewDate = assert.Src.Query.Replace(System.Environment.NewLine, string.Empty).Replace(" /", "/");
+using System.Text.RegularExpressions;
+using System;
+
+namespace SPMeta2.Regression.SSOM.Validation
+{
+ public class ListViewDefinitionValidator : ListViewModelHandler
+ {
+ public override void DeployModel(object modelHost, DefinitionBase model)
+ {
+ var listModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull());
+ var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+
+ var list = listModelHost.HostList;
+ var spObject = list.Views.FindByName(definition.Title);
+
+ var assert = ServiceFactory.AssertService
+ .NewAssert(definition, spObject)
+ .ShouldBeEqual(m => m.Title, o => o.Title)
+ .ShouldBeEqual(m => m.IsDefault, o => o.IsDefaul())
+ .ShouldBeEqual(m => m.Hidden, o => o.Hidden)
+ .ShouldBeEqual(m => m.RowLimit, o => (int)o.RowLimit)
+ .ShouldBeEqual(m => m.IsPaged, o => o.Paged);
+
+
+ if (definition.InlineEdit.HasValue)
+ assert.ShouldBeEqual(m => m.InlineEdit.ToString().ToLower(), o => o.InlineEdit.ToLower());
+ else
+ assert.SkipProperty(m => m.InlineEdit);
+
+
+ if (!string.IsNullOrEmpty(definition.Scope))
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Scope);
+ var dstProp = d.GetExpressionValue(o => o.Scope);
+
+ var scopeValue = ListViewScopeTypesConvertService.NormilizeValueToSSOMType(definition.Scope);
+
+ var isValid = scopeValue == d.Scope.ToString();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.Scope);
+ }
+
+ if (!string.IsNullOrEmpty(definition.Query))
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Query);
+ var dstProp = d.GetExpressionValue(o => o.Query);
+
+ var srcViewDate = assert.Src.Query.Replace(System.Environment.NewLine, string.Empty).Replace(" /", "/");
var dstViewDate = assert.Dst.Query.Replace(System.Environment.NewLine, string.Empty).Replace(" /", "/");
srcViewDate = Regex.Replace(srcViewDate, @"\r\n?|\n", string.Empty);
- dstViewDate = Regex.Replace(dstViewDate, @"\r\n?|\n", string.Empty);
-
-
- var isValid = srcViewDate.ToUpper() == dstViewDate.ToUpper();
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = isValid
- };
- });
- }
- else
- assert.SkipProperty(m => m.Query);
-
-
- if (!string.IsNullOrEmpty(definition.ViewData))
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.ViewData);
- var dstProp = d.GetExpressionValue(o => o.ViewData);
-
- var srcViewDate = assert.Src.ViewData.Replace(System.Environment.NewLine, string.Empty).Replace(" /", "/");
+ dstViewDate = Regex.Replace(dstViewDate, @"\r\n?|\n", string.Empty);
+
+
+ var isValid = srcViewDate.ToUpper() == dstViewDate.ToUpper();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ assert.SkipProperty(m => m.Query);
+
+
+ if (!string.IsNullOrEmpty(definition.ViewData))
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.ViewData);
+ var dstProp = d.GetExpressionValue(o => o.ViewData);
+
+ var srcViewDate = assert.Src.ViewData.Replace(System.Environment.NewLine, string.Empty).Replace(" /", "/");
var dstViewDate = assert.Dst.ViewData.Replace(System.Environment.NewLine, string.Empty).Replace(" /", "/");
srcViewDate = Regex.Replace(srcViewDate, @"\r\n?|\n", string.Empty);
- dstViewDate = Regex.Replace(dstViewDate, @"\r\n?|\n", string.Empty);
-
- var isValid = srcViewDate.ToUpper() == dstViewDate.ToUpper();
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = isValid
- };
- });
- }
- else
- assert.SkipProperty(m => m.ViewData);
-
- if (!string.IsNullOrEmpty(definition.Type))
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.Type);
- var dstProp = d.GetExpressionValue(o => o.Type);
-
- var isValid = srcProp.Value.ToString().ToUpper() ==
- dstProp.Value.ToString().ToUpper();
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = isValid
- };
- });
- }
- else
- assert.SkipProperty(m => m.Type);
-
- if (definition.ViewStyleId.HasValue)
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.ViewStyleId);
-
- var isValid = false;
-
- var srcViewId = s.ViewStyleId;
- var destViewId = 0;
-
- var doc = XDocument.Parse(d.SchemaXml);
- destViewId = ConvertUtils.ToInt(doc.Descendants("ViewStyle")
- .First()
- .GetAttributeValue("ID")
- ).Value;
-
- isValid = srcViewId == destViewId;
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- assert.SkipProperty(m => m.ViewStyleId, "ViewStyleId is null");
-
- if (!string.IsNullOrEmpty(definition.JSLink))
- assert.ShouldBeEqual(m => m.JSLink, o => o.JSLink);
- else
- assert.SkipProperty(m => m.JSLink);
-
- if (definition.DefaultViewForContentType.HasValue)
- assert.ShouldBeEqual(m => m.DefaultViewForContentType, o => o.DefaultViewForContentType);
- else
- assert.SkipProperty(m => m.DefaultViewForContentType, "DefaultViewForContentType is null or empty. Skipping.");
-
- if (definition.TabularView.HasValue)
- assert.ShouldBeEqual(m => m.TabularView, o => o.TabularView);
- else
+ dstViewDate = Regex.Replace(dstViewDate, @"\r\n?|\n", string.Empty);
+
+ var isValid = srcViewDate.ToUpper() == dstViewDate.ToUpper();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ assert.SkipProperty(m => m.ViewData);
+
+ if (definition.Types.Count() == 0)
+ {
+ assert.SkipProperty(m => m.Types, "Types.Count == 0");
+
+ if (!string.IsNullOrEmpty(definition.Type))
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Type);
+ var dstProp = d.GetExpressionValue(o => o.Type);
+
+ var isValid = srcProp.Value.ToString().ToUpper() ==
+ dstProp.Value.ToString().ToUpper();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ assert.SkipProperty(m => m.Type);
+ }
+ else
+ {
+ assert.SkipProperty(m => m.Type, "Types.Count != 0");
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Types);
+ var dstProp = d.GetExpressionValue(o => o.Type);
+
+ var isValid = false;
+
+ SPViewCollection.SPViewType? srcType = null;
+
+ foreach (var type in s.Types)
+ {
+ var tmpViewType = (SPViewCollection.SPViewType)Enum.Parse(typeof(SPViewCollection.SPViewType), type);
+
+ if (srcType == null)
+ srcType = tmpViewType;
+ else
+ srcType = srcType | tmpViewType;
+ }
+
+ var srcTypeValue = (int)srcType;
+ var dstTypeValue = (int)0;
+
+ // checking if only reccurence set
+ // test designed that way only
+ if (((int)srcTypeValue & (int)(SPViewCollection.SPViewType.Recurrence)) ==
+ (int)SPViewCollection.SPViewType.Recurrence)
+ {
+ isValid = d.RecurrenceRowset;
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+
+ if (definition.ViewStyleId.HasValue)
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.ViewStyleId);
+
+ var isValid = false;
+
+ var srcViewId = s.ViewStyleId;
+ var destViewId = 0;
+
+ var doc = XDocument.Parse(d.SchemaXml);
+ destViewId = ConvertUtils.ToInt(doc.Descendants("ViewStyle")
+ .First()
+ .GetAttributeValue("ID")
+ ).Value;
+
+ isValid = srcViewId == destViewId;
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ assert.SkipProperty(m => m.ViewStyleId, "ViewStyleId is null");
+
+ if (!string.IsNullOrEmpty(definition.JSLink))
+ assert.ShouldBeEqual(m => m.JSLink, o => o.JSLink);
+ else
+ assert.SkipProperty(m => m.JSLink);
+
+ if (definition.DefaultViewForContentType.HasValue)
+ assert.ShouldBeEqual(m => m.DefaultViewForContentType, o => o.DefaultViewForContentType);
+ else
+ assert.SkipProperty(m => m.DefaultViewForContentType, "DefaultViewForContentType is null or empty. Skipping.");
+
+ if (definition.TabularView.HasValue)
+ assert.ShouldBeEqual(m => m.TabularView, o => o.TabularView);
+ else
assert.SkipProperty(m => m.TabularView, "TabularView is null or empty. Skipping.");
if (definition.IncludeRootFolder.HasValue)
assert.ShouldBeEqual(m => m.IncludeRootFolder, o => o.IncludeRootFolder);
else
- assert.SkipProperty(m => m.IncludeRootFolder, "IncludeRootFolder is null or empty. Skipping.");
-
- if (string.IsNullOrEmpty(definition.ContentTypeName))
- assert.SkipProperty(m => m.ContentTypeName, "ContentTypeName is null or empty. Skipping.");
- else
- {
- var contentTypeId = LookupListContentTypeByName(list, definition.ContentTypeName);
-
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.ContentTypeName);
- var dstProp = d.GetExpressionValue(ct => ct.ContentTypeId);
-
- var isValis = contentTypeId == d.ContentTypeId;
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = isValis
- };
- });
- }
-
- if (string.IsNullOrEmpty(definition.ContentTypeId))
- assert.SkipProperty(m => m.ContentTypeId, "ContentTypeId is null or empty. Skipping.");
- else
- {
- var contentTypeId = LookupListContentTypeById(list, definition.ContentTypeId);
-
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.ContentTypeId);
- var dstProp = d.GetExpressionValue(ct => ct.ContentTypeId);
-
- var isValis = contentTypeId == d.ContentTypeId;
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = isValis
- };
- });
- }
-
- if (string.IsNullOrEmpty(definition.AggregationsStatus))
- assert.SkipProperty(m => m.AggregationsStatus, "Aggregationsstatus is null or empty. Skipping.");
- else
- assert.ShouldBeEqual(m => m.AggregationsStatus, o => o.AggregationsStatus);
-
- if (string.IsNullOrEmpty(definition.Aggregations))
- assert.SkipProperty(m => m.Aggregations, "Aggregations is null or empty. Skipping.");
- else
- assert.ShouldBeEqual(m => m.Aggregations, o => o.Aggregations);
-
- if (string.IsNullOrEmpty(definition.Url))
- assert.SkipProperty(m => m.Url, "Url is null or empty. Skipping.");
- else
- assert.ShouldBePartOf(m => m.Url, o => o.ServerRelativeUrl);
-
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.Fields);
- var dstProp = d.GetExpressionValue(ct => ct.ViewFields);
-
- var hasAllFields = true;
-
- foreach (var srcField in s.Fields)
- {
- var listField = d.ParentList.Fields.OfType().FirstOrDefault(f => f.StaticName == srcField);
-
- // if list-scoped field we need to check by internal name
- // internal name is changed for list scoped-fields
- // that's why to check by BOTH, definition AND real internal name
-
- if (!d.ViewFields.ToStringCollection().Contains(srcField) &&
- !d.ViewFields.ToStringCollection().Contains(listField.InternalName))
- hasAllFields = false;
- }
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = hasAllFields
- };
- });
-
- /// localization
- if (definition.TitleResource.Any())
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.TitleResource);
- var isValid = true;
-
- foreach (var userResource in s.TitleResource)
- {
- var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
- var value = d.TitleResource.GetValueForUICulture(culture);
-
- isValid = userResource.Value == value;
-
- if (!isValid)
- break;
- }
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.TitleResource, "TitleResource is NULL or empty. Skipping.");
- }
-
- }
- }
-
-}
+ assert.SkipProperty(m => m.IncludeRootFolder, "IncludeRootFolder is null or empty. Skipping.");
+
+ if (string.IsNullOrEmpty(definition.ContentTypeName))
+ assert.SkipProperty(m => m.ContentTypeName, "ContentTypeName is null or empty. Skipping.");
+ else
+ {
+ var contentTypeId = LookupListContentTypeByName(list, definition.ContentTypeName);
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.ContentTypeName);
+ var dstProp = d.GetExpressionValue(ct => ct.ContentTypeId);
+
+ var isValis = contentTypeId == d.ContentTypeId;
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValis
+ };
+ });
+ }
+
+ if (string.IsNullOrEmpty(definition.ContentTypeId))
+ assert.SkipProperty(m => m.ContentTypeId, "ContentTypeId is null or empty. Skipping.");
+ else
+ {
+ var contentTypeId = LookupListContentTypeById(list, definition.ContentTypeId);
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.ContentTypeId);
+ var dstProp = d.GetExpressionValue(ct => ct.ContentTypeId);
+
+ var isValis = contentTypeId == d.ContentTypeId;
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValis
+ };
+ });
+ }
+
+ if (string.IsNullOrEmpty(definition.AggregationsStatus))
+ assert.SkipProperty(m => m.AggregationsStatus, "Aggregationsstatus is null or empty. Skipping.");
+ else
+ assert.ShouldBeEqual(m => m.AggregationsStatus, o => o.AggregationsStatus);
+
+ if (string.IsNullOrEmpty(definition.Aggregations))
+ assert.SkipProperty(m => m.Aggregations, "Aggregations is null or empty. Skipping.");
+ else
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Aggregations);
+ var dstProp = d.GetExpressionValue(ct => ct.Aggregations);
+
+ var isValid = s.Aggregations
+ .Replace("'", string.Empty)
+ .Replace(" ", string.Empty)
+ .Replace("\"", string.Empty) ==
+ d.Aggregations
+ .Replace("'", string.Empty)
+ .Replace(" ", string.Empty)
+ .Replace("\"", string.Empty);
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+
+ if (string.IsNullOrEmpty(definition.Url))
+ assert.SkipProperty(m => m.Url, "Url is null or empty. Skipping.");
+ else
+ assert.ShouldBePartOf(m => m.Url, o => o.ServerRelativeUrl);
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Fields);
+ var dstProp = d.GetExpressionValue(ct => ct.ViewFields);
+
+ var hasAllFields = true;
+
+ foreach (var srcField in s.Fields)
+ {
+ var listField = d.ParentList.Fields.OfType().FirstOrDefault(f => f.StaticName == srcField);
+
+ // if list-scoped field we need to check by internal name
+ // internal name is changed for list scoped-fields
+ // that's why to check by BOTH, definition AND real internal name
+
+ if (!d.ViewFields.ToStringCollection().Contains(srcField) &&
+ !d.ViewFields.ToStringCollection().Contains(listField.InternalName))
+ hasAllFields = false;
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = hasAllFields
+ };
+ });
+
+ /// localization
+ if (definition.TitleResource.Any())
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.TitleResource);
+ var isValid = true;
+
+ foreach (var userResource in s.TitleResource)
+ {
+ var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
+ var value = d.TitleResource.GetValueForUICulture(culture);
+
+ isValid = userResource.Value == value;
+
+ if (!isValid)
+ break;
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.TitleResource, "TitleResource is NULL or empty. Skipping.");
+ }
+
+ }
+ }
+
+}
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowDefinitionValidator.cs
index 232bc1916..f98334788 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowDefinitionValidator.cs
@@ -1,34 +1,81 @@
-using SPMeta2.Definitions;
-using SPMeta2.Definitions.Base;
-using SPMeta2.SSOM.ModelHandlers;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using SPMeta2.SSOM.ModelHosts;
-using SPMeta2.Utils;
-
-namespace SPMeta2.Regression.SSOM.Validation
-{
- public class SP2013WorkflowDefinitionValidator : SP2013WorkflowDefinitionHandler
- {
- public override void DeployModel(object modelHost, DefinitionBase model)
- {
- var webModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull());
- var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
-
- var spObject = GetCurrentWorkflowDefinition(webModelHost.HostWeb, definition);
-
- var assert = ServiceFactory.AssertService
- .NewAssert(definition, spObject)
- .ShouldNotBeNull(spObject)
- .SkipProperty(m => m.Override, "Override is not supported yet.")
- .ShouldBeEqual(m => m.Xaml, o => o.Xaml)
- .ShouldBeEqual(m => m.DisplayName, o => o.DisplayName);
-
-
- // TODO, check Override later
- }
- }
-}
+using SPMeta2.Definitions;
+using SPMeta2.Definitions.Base;
+using SPMeta2.SSOM.ModelHandlers;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using SPMeta2.SSOM.ModelHosts;
+using SPMeta2.Utils;
+using SPMeta2.Containers.Assertion;
+
+namespace SPMeta2.Regression.SSOM.Validation
+{
+ public class SP2013WorkflowDefinitionValidator : SP2013WorkflowDefinitionHandler
+ {
+ public override void DeployModel(object modelHost, DefinitionBase model)
+ {
+ var webModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull());
+ var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+
+ var spObject = GetCurrentWorkflowDefinition(webModelHost.HostWeb, definition);
+
+ var assert = ServiceFactory.AssertService
+ .NewAssert(definition, spObject)
+ .ShouldNotBeNull(spObject)
+ .SkipProperty(m => m.Override, "Override is not supported yet.")
+ .ShouldBeEqual(m => m.Xaml, o => o.Xaml)
+ .ShouldBeEqual(m => m.DisplayName, o => o.DisplayName);
+
+ if (!string.IsNullOrEmpty(definition.RestrictToScope))
+ assert.ShouldBeEqual(m => m.RestrictToScope, o => o.RestrictToScope);
+ else
+ assert.SkipProperty(p => p.RestrictToScope);
+
+ if (!string.IsNullOrEmpty(definition.RestrictToType))
+ assert.ShouldBeEqual(m => m.RestrictToType, o => o.RestrictToType);
+ else
+ assert.SkipProperty(p => p.RestrictToType);
+
+ if (definition.Properties.Count() > 0)
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Properties);
+ var dstProp = d.GetExpressionValue(ct => ct.Properties);
+
+ var isValid = true;
+
+ foreach (var prop in s.Properties)
+ {
+ var propName = prop.Name;
+ var propValue = prop.Value;
+
+ if (!d.Properties.ContainsKey(propName))
+ {
+ isValid = false;
+ }
+
+ if (d.Properties[propName] != propValue)
+ {
+ isValid = false;
+ }
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(p => p.Properties, ".Properties.Count() = 0. Skipping");
+ }
+ }
+ }
+}
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowSubscriptionDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowSubscriptionDefinitionValidator.cs
index eaa4ae117..1647d5bdf 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowSubscriptionDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SP2013WorkflowSubscriptionDefinitionValidator.cs
@@ -147,7 +147,46 @@ private void ValidateWorkflowSubscription(object modelHost,
};
});
- #endregion
+ #endregion
+
+ if (definition.Properties.Count() > 0)
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Properties);
+ var dstProp = d.GetExpressionValue(ct => ct.PropertyDefinitions);
+
+ var isValid = true;
+
+ foreach (var prop in s.Properties)
+ {
+ var propName = prop.Name;
+ var propValue = prop.Value;
+
+ if (!d.PropertyDefinitions.ContainsKey(propName))
+ {
+ isValid = false;
+ }
+
+ if (d.PropertyDefinitions[propName] != propValue)
+ {
+ isValid = false;
+ }
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(p => p.Properties, ".Properties.Count() = 0. Skipping");
+ }
#endregion
}
diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebDefinitionValidator.cs
index 9091562c0..1b369c975 100644
--- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebDefinitionValidator.cs
+++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebDefinitionValidator.cs
@@ -1,180 +1,185 @@
-using System.Linq;
-
-using Microsoft.SharePoint;
-
-using SPMeta2.Containers.Assertion;
-using SPMeta2.Definitions;
-using SPMeta2.Regression.SSOM.Extensions;
-using SPMeta2.SSOM.ModelHandlers;
-using SPMeta2.SSOM.ModelHosts;
-using SPMeta2.Utils;
-
-namespace SPMeta2.Regression.SSOM.Validation
-{
- public class WebDefinitionValidator : WebModelHandler
- {
- public override void DeployModel(object modelHost, DefinitionBase model)
- {
- var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
- SPWeb parentWeb = null;
-
- if (modelHost is SiteModelHost)
- parentWeb = (modelHost as SiteModelHost).HostSite.RootWeb;
-
- if (modelHost is WebModelHost)
- parentWeb = (modelHost as WebModelHost).HostWeb;
-
+using System.Linq;
+
+using Microsoft.SharePoint;
+
+using SPMeta2.Containers.Assertion;
+using SPMeta2.Definitions;
+using SPMeta2.Regression.SSOM.Extensions;
+using SPMeta2.SSOM.ModelHandlers;
+using SPMeta2.SSOM.ModelHosts;
+using SPMeta2.Utils;
+
+namespace SPMeta2.Regression.SSOM.Validation
+{
+ public class WebDefinitionValidator : WebModelHandler
+ {
+ public override void DeployModel(object modelHost, DefinitionBase model)
+ {
+ var definition = model.WithAssertAndCast("model", value => value.RequireNotNull());
+ SPWeb parentWeb = null;
+
+ if (modelHost is SiteModelHost)
+ parentWeb = (modelHost as SiteModelHost).HostSite.RootWeb;
+
+ if (modelHost is WebModelHost)
+ parentWeb = (modelHost as WebModelHost).HostWeb;
+
var spObject = GetWeb(parentWeb, definition);
var assert = ServiceFactory.AssertService
- .NewAssert(definition, spObject)
- .ShouldBeEqual(m => m.LCID, o => o.GetLCID());
- //.ShouldBeEqual(m => m.WebTemplate, o => o.GetWebTemplate())
+ .NewAssert(definition, spObject)
+ .ShouldBeEqual(m => m.LCID, o => o.GetLCID());
+ //.ShouldBeEqual(m => m.WebTemplate, o => o.GetWebTemplate())
// temporarily switch culture to allow setting of the properties Title and Description for multi-language scenarios
CultureUtils.WithCulture(spObject.UICulture, () =>
{
- assert.ShouldBeEqual(m => m.Title, o => o.Title)
+ assert.ShouldBeEqual(m => m.Title, o => o.Title)
.ShouldBeEqual(m => m.UseUniquePermission, o => o.HasUniqueRoleAssignments);
- });
-
- if (!string.IsNullOrEmpty(definition.WebTemplate))
- {
- assert.ShouldBeEqual(m => m.WebTemplate, o => o.GetWebTemplate());
- assert.SkipProperty(m => m.CustomWebTemplate);
- }
- else
- {
- // no sense to chek custom web template
- assert.SkipProperty(m => m.WebTemplate);
- assert.SkipProperty(m => m.CustomWebTemplate);
- }
-
- if (!string.IsNullOrEmpty(definition.AlternateCssUrl))
- assert.ShouldBeEndOf(m => m.AlternateCssUrl, o => o.AlternateCssUrl);
- else
- assert.SkipProperty(m => m.AlternateCssUrl);
-
- if (!string.IsNullOrEmpty(definition.SiteLogoUrl))
- assert.ShouldBeEndOf(m => m.SiteLogoUrl, o => o.SiteLogoUrl);
- else
- assert.SkipProperty(m => m.SiteLogoUrl);
-
- if (!string.IsNullOrEmpty(definition.Description))
- assert.ShouldBeEqual(m => m.Description, o => o.Description);
- else
- assert.SkipProperty(m => m.Description);
-
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.Url);
- var dstProp = d.GetExpressionValue(ct => ct.Url);
-
- var srcUrl = s.Url;
- var dstUrl = d.Url;
-
- srcUrl = UrlUtility.RemoveStartingSlash(srcUrl);
-
- var dstSubUrl = dstUrl.Replace(parentWeb.Url + "/", string.Empty);
- var isValid = srcUrl.ToUpper() == dstSubUrl.ToUpper();
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = dstProp,
- IsValid = isValid
- };
- });
-
- // localization
- if (definition.TitleResource.Any())
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.TitleResource);
- var isValid = true;
-
- foreach (var userResource in s.TitleResource)
- {
- var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
- var value = d.TitleResource.GetValueForUICulture(culture);
-
- isValid = userResource.Value == value;
-
- if (!isValid)
- break;
- }
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.TitleResource, "TitleResource is NULL or empty. Skipping.");
- }
-
- if (definition.DescriptionResource.Any())
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.DescriptionResource);
- var isValid = true;
-
- foreach (var userResource in s.DescriptionResource)
- {
- var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
- var value = d.DescriptionResource.GetValueForUICulture(culture);
-
- isValid = userResource.Value == value;
-
- if (!isValid)
- break;
- }
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- {
- assert.SkipProperty(m => m.DescriptionResource, "DescriptionResource is NULL or empty. Skipping.");
- }
-
- if (definition.IndexedPropertyKeys.Any())
- {
- assert.ShouldBeEqual((p, s, d) =>
- {
- var srcProp = s.GetExpressionValue(def => def.IndexedPropertyKeys);
-
- // Search if any indexPropertyKey from definition is not in WebModel
- var differentKeys = s.IndexedPropertyKeys.Select(o => o.Name)
- .Except(d.IndexedPropertyKeys);
-
- var isValid = !differentKeys.Any();
-
- return new PropertyValidationResult
- {
- Tag = p.Tag,
- Src = srcProp,
- Dst = null,
- IsValid = isValid
- };
- });
- }
- else
- assert.SkipProperty(m => m.IndexedPropertyKeys, "IndexedPropertyKeys is NULL or empty. Skipping.");
- }
- }
-}
+ });
+
+ if (!string.IsNullOrEmpty(definition.WebTemplate))
+ {
+ assert.ShouldBeEqual(m => m.WebTemplate, o => o.GetWebTemplate());
+ assert.SkipProperty(m => m.CustomWebTemplate);
+ }
+ else
+ {
+ // no sense to chek custom web template
+ assert.SkipProperty(m => m.WebTemplate);
+ assert.SkipProperty(m => m.CustomWebTemplate);
+ }
+
+ if (!string.IsNullOrEmpty(definition.AlternateCssUrl))
+ assert.ShouldBeEndOf(m => m.AlternateCssUrl, o => o.AlternateCssUrl);
+ else
+ assert.SkipProperty(m => m.AlternateCssUrl);
+
+ if (!string.IsNullOrEmpty(definition.SiteLogoUrl))
+ assert.ShouldBeEndOf(m => m.SiteLogoUrl, o => o.SiteLogoUrl);
+ else
+ assert.SkipProperty(m => m.SiteLogoUrl);
+
+ if (!string.IsNullOrEmpty(definition.Description))
+ assert.ShouldBeEqual(m => m.Description, o => o.Description);
+ else
+ assert.SkipProperty(m => m.Description);
+
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.Url);
+ var dstProp = d.GetExpressionValue(ct => ct.Url);
+
+ var srcUrl = s.Url;
+ var dstUrl = d.Url;
+
+ srcUrl = UrlUtility.RemoveStartingSlash(srcUrl);
+
+ var dstSubUrl = dstUrl.Replace(parentWeb.Url + "/", string.Empty);
+ var isValid = srcUrl.ToUpper() == dstSubUrl.ToUpper();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = dstProp,
+ IsValid = isValid
+ };
+ });
+
+ // localization
+ if (definition.TitleResource.Any())
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.TitleResource);
+ var isValid = true;
+
+ foreach (var userResource in s.TitleResource)
+ {
+ var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
+ var value = d.TitleResource.GetValueForUICulture(culture);
+
+ isValid = userResource.Value == value;
+
+ if (!isValid)
+ break;
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.TitleResource, "TitleResource is NULL or empty. Skipping.");
+ }
+
+ if (definition.DescriptionResource.Any())
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.DescriptionResource);
+ var isValid = true;
+
+ foreach (var userResource in s.DescriptionResource)
+ {
+ var culture = LocalizationService.GetUserResourceCultureInfo(userResource);
+ var value = d.DescriptionResource.GetValueForUICulture(culture);
+
+ isValid = userResource.Value == value;
+
+ if (!isValid)
+ break;
+ }
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ {
+ assert.SkipProperty(m => m.DescriptionResource, "DescriptionResource is NULL or empty. Skipping.");
+ }
+
+ if (definition.IndexedPropertyKeys.Any())
+ {
+ assert.ShouldBeEqual((p, s, d) =>
+ {
+ var srcProp = s.GetExpressionValue(def => def.IndexedPropertyKeys);
+
+ // Search if any indexPropertyKey from definition is not in WebModel
+ var differentKeys = s.IndexedPropertyKeys.Select(o => o.Name)
+ .Except(d.IndexedPropertyKeys);
+
+ var isValid = !differentKeys.Any();
+
+ return new PropertyValidationResult
+ {
+ Tag = p.Tag,
+ Src = srcProp,
+ Dst = null,
+ IsValid = isValid
+ };
+ });
+ }
+ else
+ assert.SkipProperty(m => m.IndexedPropertyKeys, "IndexedPropertyKeys is NULL or empty. Skipping.");
+
+
+ // O365 props
+ assert.SkipProperty(m => m.MembersCanShare, "Skipping O365 prop");
+ assert.SkipProperty(m => m.RequestAccessEmail, "Skipping O365 prop");
+ }
+ }
+}
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Base/SPMeta2RegresionTestBase.cs b/SPMeta2/SPMeta2.Regression.Tests/Base/SPMeta2RegresionTestBase.cs
index cef6e5f36..5bca64005 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Base/SPMeta2RegresionTestBase.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Base/SPMeta2RegresionTestBase.cs
@@ -29,11 +29,87 @@
using SPMeta2.Regression.ModelHandlers;
using SPMeta2.Regression.Tests.Impl.Scenarios.Webparts;
using SPMeta2.Services;
+using System.IO;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Tests.Base
{
public class SPMeta2RegresionTestCoreBase
{
+ static SPMeta2RegresionTestCoreBase()
+ {
+ AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
+ }
+
+ static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
+ {
+ var m2runner = Environment.GetEnvironmentVariable("SPMeta2_RunnerLibraries", EnvironmentVariableTarget.Machine);
+ var baseDir = AppDomain.CurrentDomain.BaseDirectory;
+
+ RegressionUtils.WriteLine(string.Format("Resolving custom assembly binding for m2 runner:[{0}]", m2runner));
+
+ RegressionUtils.WriteLine(string.Format(" RequestingAssembly:[{0}]", args.RequestingAssembly));
+ RegressionUtils.WriteLine(string.Format(" What requested:[{0}]", args.Name));
+
+ if (args.Name.Contains(".resources,"))
+ {
+ RegressionUtils.WriteLine("resources assembly. returning null");
+ return null;
+ }
+
+ var assemblyName = args.Name.Split(',')[0] + ".dll";
+ var assemblyVersion = args.Name.Split(',')[1].Split('=')[1];
+
+ var assemblyDirs = new List();
+
+ if (assemblyName.Contains("Microsoft.SharePoint.Client."))
+ {
+ switch (assemblyVersion)
+ {
+ case "16.1.0.0":
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\csom-v365"));
+ break;
+
+ case "15.0.0.0":
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\csom-v2013"));
+ break;
+ }
+ }
+
+ if (m2runner == "SPMeta2.Containers.O365v16.dll")
+ {
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\spmeta2-csom-365"));
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\spmeta2-csom-regression-365"));
+ }
+
+ if (m2runner == "SPMeta2.Containers.O365.dll")
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\spmeta2-csom-2013"));
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\spmeta2-csom-regression-2013"));
+
+ if (m2runner == "SPMeta2.Containers.CSOM.dll")
+ {
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\spmeta2-csom-2013"));
+ assemblyDirs.Add(Path.Combine(baseDir, @"_Dependencies\spmeta2-csom-regression-2013"));
+ }
+
+ foreach (var dir in assemblyDirs)
+ {
+ var filePath = Path.Combine(dir, assemblyName);
+
+ if (File.Exists(filePath))
+ {
+ RegressionUtils.WriteLine(string.Format("Loading assemblly:[{0}]", filePath));
+ return Assembly.LoadFile(filePath);
+ }
+ }
+
+ throw new Exception(string.Format("Cannot load custom assembly:[{0}] for assembly:[{1}]",
+ args.Name,
+ args.RequestingAssembly
+ ));
+ }
+
+
public SPMeta2RegresionTestCoreBase()
{
Rnd = new DefaultRandomService();
@@ -100,7 +176,7 @@ public SPMeta2ProvisionRegresionTestBase()
TestOptions.EnableContentTypeHubTests = true;
TestOptions.EnablWebConfigModificationTest = false;
-
+
// too long, disabled by default
// Module file provision fails at minor version 511 #930
// https://github.com/SubPointSolutions/spmeta2/issues/930
@@ -372,7 +448,7 @@ private void PleaseMakeSureWeCanSerializeDeserializeAndStillDeploy(IEnumerable
+ IndentableTrace.WithScope(trace =>
{
trace.WriteLine("Saving-restoring XML/JSON models. Deployng..");
var serializedModels = RegressionService.GetSerializedAndRestoredModels(models);
@@ -400,7 +476,7 @@ private void ProcessDefinitionsPropertyNulableValidation(DefinitionBase def)
.Where(p => p.GetCustomAttributes(typeof(ExpectNullable), true).Count() > 0);
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
trace.WriteLine("");
@@ -430,7 +506,7 @@ private void ProcessDefinitionsPropertyUpdateValidation(DefinitionBase def)
.Where(p => p.GetCustomAttributes(typeof(ExpectUpdate), true).Count() > 0);
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
trace.WriteLine("");
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.0.wsp b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.0.wsp
new file mode 100644
index 000000000..32b5e4c71
Binary files /dev/null and b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.0.wsp differ
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.1.wsp b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.1.wsp
new file mode 100644
index 000000000..4e6f1be09
Binary files /dev/null and b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.1.wsp differ
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.2.wsp b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.2.wsp
new file mode 100644
index 000000000..4e2167eab
Binary files /dev/null and b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.2.wsp differ
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.4.wsp b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.4.wsp
new file mode 100644
index 000000000..936fc4938
Binary files /dev/null and b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.4.wsp differ
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.5.wsp b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.5.wsp
new file mode 100644
index 000000000..b89b9d44a
Binary files /dev/null and b/SPMeta2/SPMeta2.Regression.Tests/Containers/DesignPackages/ci-1-1.5.wsp differ
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Extensions/ListDefinitionExtensions.cs b/SPMeta2/SPMeta2.Regression.Tests/Extensions/ListDefinitionExtensions.cs
new file mode 100644
index 000000000..85a52f6c6
--- /dev/null
+++ b/SPMeta2/SPMeta2.Regression.Tests/Extensions/ListDefinitionExtensions.cs
@@ -0,0 +1,163 @@
+using SPMeta2.Definitions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace SPMeta2.Regression.Tests.Extensions
+{
+ public static class ListDefinitionExtensions
+ {
+ public static string GetListUrl(this ListDefinition listDefinition)
+ {
+
+ if (!string.IsNullOrEmpty(listDefinition.CustomUrl))
+ return listDefinition.CustomUrl;
+
+ if (listDefinition.Url.ToUpper().Contains("_CATALOGS"))
+ return listDefinition.Url;
+
+ // BIG BIG BIG TODO
+ // correct list/doc lib mapping has to be implemented and tested
+ // very critical part of the whole provision lib
+
+ var templateType = (ListTemplateType)listDefinition.TemplateType;
+
+ switch (templateType)
+ {
+ case ListTemplateType.Events:
+ case ListTemplateType.Tasks:
+ case ListTemplateType.GenericList:
+ case ListTemplateType.AdminTasks:
+ case ListTemplateType.Agenda:
+ case ListTemplateType.Announcements:
+ case ListTemplateType.Comments:
+ case ListTemplateType.Contacts:
+ case ListTemplateType.DiscussionBoard:
+ case ListTemplateType.ExternalList:
+ case ListTemplateType.Links:
+ case ListTemplateType.WorkflowHistory:
+ case ListTemplateType.Facility:
+ case ListTemplateType.GanttTasks:
+ case ListTemplateType.Posts:
+
+ return "Lists/" + listDefinition.Url;
+
+ case ListTemplateType.CallTrack:
+ case ListTemplateType.Categories:
+ case ListTemplateType.Circulation:
+ case ListTemplateType.CustomGrid:
+ case ListTemplateType.DataConnectionLibrary:
+ case ListTemplateType.DataSources:
+ case ListTemplateType.Decision:
+ case ListTemplateType.DocumentLibrary:
+
+
+ case ListTemplateType.HealthReports:
+ case ListTemplateType.HealthRules:
+ case ListTemplateType.Holidays:
+ case ListTemplateType.HomePageLibrary:
+ case ListTemplateType.IMEDic:
+ case ListTemplateType.InvalidType:
+ case ListTemplateType.IssueTracking:
+
+ case ListTemplateType.ListTemplateCatalog:
+ case ListTemplateType.MasterPageCatalog:
+ case ListTemplateType.MeetingObjective:
+ case ListTemplateType.MeetingUser:
+ case ListTemplateType.Meetings:
+ case ListTemplateType.NoCodePublic:
+ case ListTemplateType.NoCodeWorkflows:
+ case ListTemplateType.NoListTemplate:
+ case ListTemplateType.PictureLibrary:
+
+ case ListTemplateType.SolutionCatalog:
+ case ListTemplateType.Survey:
+ case ListTemplateType.TextBox:
+ case ListTemplateType.ThemeCatalog:
+ case ListTemplateType.ThingsToBring:
+ case ListTemplateType.Timecard:
+ case ListTemplateType.UserInformation:
+ case ListTemplateType.WebPageLibrary:
+ case ListTemplateType.WebPartCatalog:
+ case ListTemplateType.WebTemplateCatalog:
+ case ListTemplateType.Whereabouts:
+
+ case ListTemplateType.WorkflowProcess:
+ case ListTemplateType.XMLForm:
+
+ break;
+ default:
+ break;
+ }
+
+ return listDefinition.Url;
+ }
+
+
+ private enum ListTemplateType
+ {
+ InvalidType = -1,
+ NoListTemplate = 0,
+ GenericList = 100,
+ DocumentLibrary = 101,
+ Survey = 102,
+ Links = 103,
+ Announcements = 104,
+ Contacts = 105,
+ Events = 106,
+ Tasks = 107,
+ DiscussionBoard = 108,
+ PictureLibrary = 109,
+ DataSources = 110,
+ WebTemplateCatalog = 111,
+ UserInformation = 112,
+ WebPartCatalog = 113,
+ ListTemplateCatalog = 114,
+ XMLForm = 115,
+ MasterPageCatalog = 116,
+ NoCodeWorkflows = 117,
+ WorkflowProcess = 118,
+ WebPageLibrary = 119,
+ CustomGrid = 120,
+ SolutionCatalog = 121,
+ NoCodePublic = 122,
+ ThemeCatalog = 123,
+ DesignCatalog = 124,
+ AppDataCatalog = 125,
+ DataConnectionLibrary = 130,
+ WorkflowHistory = 140,
+ GanttTasks = 150,
+ HelpLibrary = 151,
+ AccessRequest = 160,
+ TasksWithTimelineAndHierarchy = 171,
+ MaintenanceLogs = 175,
+ Meetings = 200,
+ Agenda = 201,
+ MeetingUser = 202,
+ Decision = 204,
+ MeetingObjective = 207,
+ TextBox = 210,
+ ThingsToBring = 211,
+ HomePageLibrary = 212,
+ Posts = 301,
+ Comments = 302,
+ Categories = 303,
+ Facility = 402,
+ Whereabouts = 403,
+ CallTrack = 404,
+ Circulation = 405,
+ Timecard = 420,
+ Holidays = 421,
+ IMEDic = 499,
+ ExternalList = 600,
+ MySiteDocumentLibrary = 700,
+ IssueTracking = 1100,
+ AdminTasks = 1200,
+ HealthRules = 1220,
+ HealthReports = 1221,
+ DeveloperSiteDraftApps = 1230,
+ }
+ }
+}
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/DefinitionTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/DefinitionTests.cs
index e7640b56b..c02d96fbc 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/DefinitionTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/DefinitionTests.cs
@@ -21,7 +21,8 @@
using SPMeta2.Regression.Tests.Config;
using SPMeta2.Services;
using SPMeta2.Containers.Utils;
-using SPMeta2.Standard.Definitions.Webparts;
+using SPMeta2.Standard.Definitions.Webparts;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Tests.Impl.Definitions
{
@@ -128,7 +129,7 @@ public void DefinitionsShouldHaveToStringOverride()
var hasToStringOverride = definitionType.GetMethod("ToString").DeclaringType == definitionType;
if (!hasToStringOverride)
- Trace.WriteLine(string.Format("Checking definition type:[{0}]. Has override:[{1}]", definitionType, hasToStringOverride));
+ RegressionUtils.WriteLine(string.Format("Checking definition type:[{0}]. Has override:[{1}]", definitionType, hasToStringOverride));
Assert.IsTrue(hasToStringOverride);
}
@@ -145,7 +146,7 @@ public void DefinitionsShouldBeMarkedAsSerializable()
{
var hasAttr = definitionType.GetCustomAttributes(typeof(SerializableAttribute)).Any();
- Trace.WriteLine(string.Format("[{2}] - Checking definition type:[{0}]. Has SerializableAttribute:[{1}]",
+ RegressionUtils.WriteLine(string.Format("[{2}] - Checking definition type:[{0}]. Has SerializableAttribute:[{1}]",
definitionType, hasAttr, hasAttr.ToString().ToUpper()));
if (!hasAttr)
@@ -168,7 +169,7 @@ public void DefinitionsShouldBeMarkedAsDataContract()
if (!hasAttr)
{
- Trace.WriteLine(string.Format("[{2}] - Checking definition type:[{0}]. Has DataContractAttribute:[{1}]",
+ RegressionUtils.WriteLine(string.Format("[{2}] - Checking definition type:[{0}]. Has DataContractAttribute:[{1}]",
definitionType, hasAttr, hasAttr.ToString().ToUpper()));
}
@@ -193,7 +194,7 @@ public void ModelNodesShouldBeMarkedAsDataContract_v12()
if (!hasAttr)
{
- Trace.WriteLine(string.Format("[{2}] - Checking model node type:[{0}]. Has DataContractAttribute:[{1}]",
+ RegressionUtils.WriteLine(string.Format("[{2}] - Checking model node type:[{0}]. Has DataContractAttribute:[{1}]",
modelNodeType, hasAttr, hasAttr.ToString().ToUpper()));
}
@@ -219,7 +220,7 @@ public void DefinitionsShouldHasIdentityOrIdentityKey()
if (isSingleIdenity)
{
- //Trace.WriteLine(string.Format("[{1}] - Checking SINGLE type:[{0}].", definitionType, bool.TrueString.ToUpper()));
+ //RegressionUtils.WriteLine(string.Format("[{1}] - Checking SINGLE type:[{0}].", definitionType, bool.TrueString.ToUpper()));
continue;
}
@@ -232,7 +233,7 @@ public void DefinitionsShouldHasIdentityOrIdentityKey()
.Any();
if (!hasKeys)
{
- Trace.WriteLine(string.Format("[{2}] - Checking INSTANCE type:[{0}]. Has keys:[{1}]",
+ RegressionUtils.WriteLine(string.Format("[{2}] - Checking INSTANCE type:[{0}]. Has keys:[{1}]",
definitionType, hasKeys, hasKeys.ToString().ToUpper()));
}
@@ -267,7 +268,7 @@ public void ModelNodeTypesPublicPropsShouldBeMarkedAsDataMemberOrIgnoreDataMembe
if (!hasAttr)
{
- Trace.WriteLine(string.Format("[{2}] - Checking definition type:[{0}]. Prop:[{1}]",
+ RegressionUtils.WriteLine(string.Format("[{2}] - Checking definition type:[{0}]. Prop:[{1}]",
definitionType.Name, prop.Name, hasAttr));
}
@@ -279,7 +280,7 @@ public void ModelNodeTypesPublicPropsShouldBeMarkedAsDataMemberOrIgnoreDataMembe
}
}
- Trace.WriteLine(string.Format("Errors: [{0}]", errors));
+ RegressionUtils.WriteLine(string.Format("Errors: [{0}]", errors));
Assert.IsTrue(result);
}
@@ -292,7 +293,7 @@ public void DefinitionsPublicPropsShouldBeMarkedAsDataMemberOrIgnoreDataMemberAt
var targetTypes = AllDefinitionTypes;
var errors = CheckDataMemberOrIgnoreDataMemberAttr(targetTypes);
- Trace.WriteLine(string.Format("Errors: [{0}]", errors));
+ RegressionUtils.WriteLine(string.Format("Errors: [{0}]", errors));
Assert.IsTrue(errors == 0);
}
@@ -312,7 +313,7 @@ public void TypedWebPartDefinitions_Should_Have_ExpectWebpartType_Attr()
if (!hasAttr)
{
- Trace.WriteLine(string.Format(" - Checking type:[{0}]. Has:[{1}] Attr:[ExpectWebpartType]",
+ RegressionUtils.WriteLine(string.Format(" - Checking type:[{0}]. Has:[{1}] Attr:[ExpectWebpartType]",
definitionType.Name, hasAttr));
}
@@ -322,7 +323,7 @@ public void TypedWebPartDefinitions_Should_Have_ExpectWebpartType_Attr()
}
}
- Trace.WriteLine(string.Format("Errors: [{0}]", errors));
+ RegressionUtils.WriteLine(string.Format("Errors: [{0}]", errors));
Assert.IsTrue(errors == 0);
}
@@ -342,7 +343,7 @@ private static int CheckDataMemberOrIgnoreDataMemberAttr(List types)
if (!hasAttr)
{
- Trace.WriteLine(string.Format("[{2}] - Checking type:[{0}]. Prop:[{1}]",
+ RegressionUtils.WriteLine(string.Format("[{2}] - Checking type:[{0}]. Prop:[{1}]",
definitionType.Name, prop.Name, hasAttr));
}
@@ -373,7 +374,7 @@ public void AllSerializablesPublicPropsShouldBeMarkedAsDataMemberOrIgnoreDataMem
var errors = CheckDataMemberOrIgnoreDataMemberAttr(targetTypes);
- Trace.WriteLine(string.Format("Errors: [{0}]", errors));
+ RegressionUtils.WriteLine(string.Format("Errors: [{0}]", errors));
Assert.IsTrue(errors == 0);
}
@@ -403,12 +404,12 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
{
var definitionName = definitionType.Name.Replace("Definition", string.Empty);
- Trace.WriteLine(string.Format("Definition: [{0}]", definitionName));
+ RegressionUtils.WriteLine(string.Format("Definition: [{0}]", definitionName));
#region AddXXX()
// validate (this ModelNode model, XXXDefinition definition)
- Trace.WriteLine(string.Format(" Add{0}(this ModelNode model, {0}Definition definition)", definitionName));
+ RegressionUtils.WriteLine(string.Format(" Add{0}(this ModelNode model, {0}Definition definition)", definitionName));
var addDefinitionMethodName = string.Format("Add{0}", definitionName);
var hasAddDefinitionMethod = methods.FirstOrDefault(m =>
@@ -417,7 +418,7 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
m.GetParameters()[0].ParameterType == typeof(ModelNode) &&
m.GetParameters()[1].ParameterType == definitionType) != null;
- Trace.WriteLine(string.Format(" Add{0}(this ModelNode model, {0}Definition definition, Action action))", definitionName));
+ RegressionUtils.WriteLine(string.Format(" Add{0}(this ModelNode model, {0}Definition definition, Action action))", definitionName));
// 2. should be one with "(this ModelNode model, XXXDefinition definition, Action action)"
var hasAddDefinitionWithCallbackMethod = true;
@@ -429,8 +430,8 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
// m.GetParameters()[2].ParameterType == typeof(Action)) != null;
- Trace.WriteLine(string.Format(" [{0}] - Add{1}(this ModelNode model, {1}Definition definition))", hasAddDefinitionMethod.ToString().ToUpper(), definitionName));
- Trace.WriteLine(string.Format(" [{0}] - Add{1}(this ModelNode model, {1}Definition definition, Action action))", hasAddDefinitionWithCallbackMethod.ToString().ToUpper(), definitionName));
+ RegressionUtils.WriteLine(string.Format(" [{0}] - Add{1}(this ModelNode model, {1}Definition definition))", hasAddDefinitionMethod.ToString().ToUpper(), definitionName));
+ RegressionUtils.WriteLine(string.Format(" [{0}] - Add{1}(this ModelNode model, {1}Definition definition, Action action))", hasAddDefinitionWithCallbackMethod.ToString().ToUpper(), definitionName));
#endregion
@@ -442,7 +443,7 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
if (shouldCheckArrayOverload)
{
// validate (this ModelNode model, XXXDefinition definition)
- Trace.WriteLine(
+ RegressionUtils.WriteLine(
string.Format(
" Add{0}s(this ModelNode model, IEnumerable<{0}Definition> definitions, Action action))",
definitionName));
@@ -470,14 +471,14 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
m.GetParameters()[0].ParameterType == typeof(ModelNode) &&
m.GetParameters()[1].ParameterType == arrayDefinitionType) != null;
- Trace.WriteLine(
+ RegressionUtils.WriteLine(
string.Format(" [{0}] - {1}(this ModelNode model, IEnumerable<{2}Definition> definitions))",
hasAddArrayDefinitionMethod.ToString().ToUpper(), addArrayDefinitionMethodName, definitionName));
}
else
{
- Trace.WriteLine(string.Format(" [SKIPPING] Skipping AddXXXs() arrary overload as there is no ExpectArrayExtensionMethod attr"));
+ RegressionUtils.WriteLine(string.Format(" [SKIPPING] Skipping AddXXXs() arrary overload as there is no ExpectArrayExtensionMethod attr"));
}
#endregion
@@ -493,7 +494,7 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
if (shouldCheckAddHostOverload)
{
// validate (this ModelNode model, XXXDefinition definition)
- Trace.WriteLine(string.Format(" AddHost{0}(this ModelNode model, {0}Definition definition)",
+ RegressionUtils.WriteLine(string.Format(" AddHost{0}(this ModelNode model, {0}Definition definition)",
definitionName));
var addHostDefinitionMethodName = string.Format("AddHost{0}", definitionName);
@@ -503,7 +504,7 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
m.GetParameters()[0].ParameterType == typeof(ModelNode) &&
m.GetParameters()[1].ParameterType == definitionType) != null;
- Trace.WriteLine(
+ RegressionUtils.WriteLine(
string.Format(
" AddHost{0}(this ModelNode model, {0}Definition definition, Action action))",
definitionName));
@@ -516,17 +517,17 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v11()
m.GetParameters()[2].ParameterType == typeof(Action)) != null;
- Trace.WriteLine(
+ RegressionUtils.WriteLine(
string.Format(" [{0}] - AddHost{1}(this ModelNode model, {1}Definition definition))",
hasAddHostDefinitionMethod.ToString().ToUpper(), definitionName));
- Trace.WriteLine(
+ RegressionUtils.WriteLine(
string.Format(
" [{0}] - AddHost{1}(this ModelNode model, {1}Definition definition, Action action))",
hasAddHostDefinitionWithCallbackMethod.ToString().ToUpper(), definitionName));
}
else
{
- Trace.WriteLine(string.Format(" [SKIPPING] Skipping AddHostXXX() methods as there is no ExpectAddHostExtensionMethod attr"));
+ RegressionUtils.WriteLine(string.Format(" [SKIPPING] Skipping AddHostXXX() methods as there is no ExpectAddHostExtensionMethod attr"));
}
#endregion
@@ -564,7 +565,7 @@ public void DefinitionsShouldHaveWithXXX_DefinitionSyntax_v11()
{
var definitionName = definitionType.Name.Replace("Definition", string.Empty);
- Trace.WriteLine(string.Format("Definition: [{0}]", definitionName));
+ RegressionUtils.WriteLine(string.Format("Definition: [{0}]", definitionName));
var shouldCheckWithMethod = definitionType.GetCustomAttributes(typeof(ExpectWithExtensionMethod), false).Any();
@@ -586,7 +587,7 @@ public void DefinitionsShouldHaveWithXXX_DefinitionSyntax_v11()
if (!shouldCheckWithMethod)
{
if (showSkipping)
- Trace.WriteLine(string.Format(" {0}(this ModelNode model, {0}Definition definition, Action action)) - SKIPPING", addDefinitionMethodName));
+ RegressionUtils.WriteLine(string.Format(" {0}(this ModelNode model, {0}Definition definition, Action action)) - SKIPPING", addDefinitionMethodName));
continue;
}
@@ -599,9 +600,9 @@ public void DefinitionsShouldHaveWithXXX_DefinitionSyntax_v11()
m.GetParameters()[1].ParameterType == typeof(Action)) != null;
if (hasWithMethod)
- Trace.WriteLine(string.Format(" {0}(this ModelNode model, {0}Definition definition, Action action)) - TRUE", addDefinitionMethodName));
+ RegressionUtils.WriteLine(string.Format(" {0}(this ModelNode model, {0}Definition definition, Action action)) - TRUE", addDefinitionMethodName));
else
- Trace.WriteLine(string.Format(" {0}(this ModelNode model, {0}Definition definition, Action action)) - FALSE", addDefinitionMethodName));
+ RegressionUtils.WriteLine(string.Format(" {0}(this ModelNode model, {0}Definition definition, Action action)) - FALSE", addDefinitionMethodName));
#endregion
@@ -661,21 +662,21 @@ public void DefinitionsShouldHave_ParentHostCapabilityAttribute_v12()
var defTypesWithoutRelationships = AllDefinitionTypes.Where(d => AllDefinitionRelationships.All(r => r.DefinitionType != d));
- Trace.WriteLine("Cheking ParentHostCapability attr presence for all definitions");
+ RegressionUtils.WriteLine("Cheking ParentHostCapability attr presence for all definitions");
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
foreach (var def in defTypesWithoutRelationships)
- Trace.WriteLine(string.Format("missing relationship for definition:[{0}]", def.Name));
+ RegressionUtils.WriteLine(string.Format("missing relationship for definition:[{0}]", def.Name));
});
if (defTypesWithoutRelationships.Any())
passed = false;
if (defTypesWithoutRelationships.Any())
- Trace.WriteLine("[FALSE] Missing definition relationships detected");
+ RegressionUtils.WriteLine("[FALSE] Missing definition relationships detected");
else
- Trace.WriteLine("[TRUE] Missing definition relationships detected");
+ RegressionUtils.WriteLine("[TRUE] Missing definition relationships detected");
Assert.IsTrue(passed);
}
@@ -686,13 +687,13 @@ public void DefinitionsShouldHave_ParentHostCapabilityAttribute_v12()
[TestCategory("CI.Core")]
public void DefinitionsShouldHave_TypedModelNodes_v12()
{
- Trace.WriteLine("Checking typed model nodes");
- Trace.WriteLine("");
+ RegressionUtils.WriteLine("Checking typed model nodes");
+ RegressionUtils.WriteLine("");
var passes = true;
var showOnlyFalseOutput = true;
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
foreach (var defType in AllDefinitionTypes.OrderBy(d => d.Name))
{
@@ -748,10 +749,10 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
// AddField(this TModelNode model, FieldDefinition definition, Action action)
// where TModelNode : ModelNode, IFieldHostModelNode, new()
- Trace.WriteLine("Checking AddXXX() method specs");
- Trace.WriteLine("");
+ RegressionUtils.WriteLine("Checking AddXXX() method specs");
+ RegressionUtils.WriteLine("");
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
foreach (var defType in AllDefinitionTypes.OrderBy(d => d.Name))
{
@@ -973,7 +974,7 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
passed = false;
completedtype = false;
- addXXXTrace.WriteLine("[FALSE] AddXXX()");
+ RegressionUtils.WriteLine("[FALSE] AddXXX()");
}
else
{
@@ -982,9 +983,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (missedRelationshipModelNodeTypes.Any())
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine(string.Format(
+ completedtype = false;
+
+ RegressionUtils.WriteLine(string.Format(
"[FALSE] AddXXX() misses relationships: [{0}]",
string.Join(",", missedRelationshipModelNodeTypes)));
}
@@ -993,9 +994,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (addMethodPlainWithCallBack == null)
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine("[FALSE] AddXXX(callback)");
+ completedtype = false;
+
+ RegressionUtils.WriteLine("[FALSE] AddXXX(callback)");
}
else
{
@@ -1004,9 +1005,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (missedRelationshipModelNodeTypes.Any())
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine(string.Format(
+ completedtype = false;
+
+ RegressionUtils.WriteLine(string.Format(
"[FALSE] AddXXX(callback) misses relationships: [{0}]",
string.Join(",", missedRelationshipModelNodeTypes)));
}
@@ -1019,9 +1020,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (addMethodWithArraySupport == null)
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine("[FALSE] AddXXXs()");
+ completedtype = false;
+
+ RegressionUtils.WriteLine("[FALSE] AddXXXs()");
}
else
{
@@ -1030,9 +1031,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (missedRelationshipModelNodeTypes.Any())
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine(string.Format(
+ completedtype = false;
+
+ RegressionUtils.WriteLine(string.Format(
"[FALSE] AddXXXs() misses relationships: [{0}]",
string.Join(",", missedRelationshipModelNodeTypes)));
}
@@ -1048,9 +1049,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (addHostMethodPlain == null)
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine("[FALSE] AddHostXXX()");
+ completedtype = false;
+
+ RegressionUtils.WriteLine("[FALSE] AddHostXXX()");
}
else
{
@@ -1059,9 +1060,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (missedRelationshipModelNodeTypes.Any())
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine(string.Format(
+ completedtype = false;
+
+ RegressionUtils.WriteLine(string.Format(
"[FALSE] AddHostXXX() misses relationships: [{0}]",
string.Join(",", missedRelationshipModelNodeTypes)));
}
@@ -1070,9 +1071,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (addHostMethodPlainWithCallBack == null)
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine("[FALSE] AddHostXXX(callback)");
+ completedtype = false;
+
+ RegressionUtils.WriteLine("[FALSE] AddHostXXX(callback)");
}
else
{
@@ -1081,9 +1082,9 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
if (missedRelationshipModelNodeTypes.Any())
{
passed = false;
- completedtype = false;
-
- addXXXTrace.WriteLine(string.Format(
+ completedtype = false;
+
+ RegressionUtils.WriteLine(string.Format(
"[FALSE] AddHostXXX(callback) misses relationships: [{0}]",
string.Join(",", missedRelationshipModelNodeTypes)));
}
@@ -1099,8 +1100,8 @@ public void DefinitionsShouldHaveAddXXX_DefinitionSyntax_v12()
}
});
- Trace.WriteLine("");
- Trace.WriteLine(string.Format("{0}/{1}", missesCount, allCount));
+ RegressionUtils.WriteLine("");
+ RegressionUtils.WriteLine(string.Format("{0}/{1}", missesCount, allCount));
Assert.IsTrue(passed);
}
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/FieldDefinitionTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/FieldDefinitionTests.cs
index 5f3cadcb5..fa36ab02e 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/FieldDefinitionTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Definitions/FieldDefinitionTests.cs
@@ -20,7 +20,8 @@
using SPMeta2.Standard.Definitions.Taxonomy;
using SPMeta2.Syntax.Default;
using SPMeta2.Utils;
-using SPMeta2.Regression.Tests.Base;
+using SPMeta2.Regression.Tests.Base;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Tests.Impl.Definitions
{
@@ -56,7 +57,7 @@ public void FieldDefinitions_ShouldHave_Correct_Indexed_Property()
foreach (var fieldDefintion in fieldDefinitionTypes)
{
- Trace.WriteLine(string.Format("Checking Indexed prop for Indexed def:[{0}]", fieldDefintion.GetType().Name));
+ RegressionUtils.WriteLine(string.Format("Checking Indexed prop for Indexed def:[{0}]", fieldDefintion.GetType().Name));
var indexedSiteModel = SPMeta2Model.NewSiteModel(m => { });
var indexedSiteField = ModelGeneratorService.GetRandomDefinition(fieldDefintion) as FieldDefinition;
@@ -75,7 +76,7 @@ public void FieldDefinitions_ShouldHave_Correct_Indexed_Property()
TestModel(indexedSiteModel);
- Trace.WriteLine(string.Format("Checking Indexed prop for non-Indexed def:[{0}]", fieldDefintion.GetType().Name));
+ RegressionUtils.WriteLine(string.Format("Checking Indexed prop for non-Indexed def:[{0}]", fieldDefintion.GetType().Name));
var nonIdexedSiteModel = SPMeta2Model.NewSiteModel(m => { });
var nonIndexedSiteField = ModelGeneratorService.GetRandomDefinition(fieldDefintion) as FieldDefinition;
@@ -107,7 +108,7 @@ public void FieldDefinitions_ShouldHave_Correct_ValidationMessageAndFormula_Prop
foreach (var fieldDefintion in fieldDefinitionTypes)
{
- Trace.WriteLine(string.Format("Checking Indexed propr for Indexed def:[{0}]", fieldDefintion.GetType().Name));
+ RegressionUtils.WriteLine(string.Format("Checking Indexed propr for Indexed def:[{0}]", fieldDefintion.GetType().Name));
var siteModel = SPMeta2Model.NewSiteModel(m => { });
var siteField = ModelGeneratorService.GetRandomDefinition(fieldDefintion) as FieldDefinition;
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs
index dc16acfc9..d644950a0 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs
@@ -121,7 +121,7 @@ public void CanSerialize_SiteModelToXMLAndBack()
});
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
var modelString = SPMeta2Model.ToXML(orginalModel);
Assert.IsFalse(string.IsNullOrEmpty(modelString));
@@ -146,7 +146,7 @@ public void CanSerialize_SiteModelToJSONAndBack()
});
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
var modelString = SPMeta2Model.ToJSON(orginalModel);
Assert.IsFalse(string.IsNullOrEmpty(modelString));
@@ -209,5 +209,115 @@ public void Should_Pass_On_Valid_SSOM_Invalid_CSOM_2()
}
#endregion
+
+ #region new model API
+
+ [TestMethod]
+ [TestCategory("Regression.SPMeta2Model.NewXXXModel")]
+ [TestCategory("CI.Core")]
+ public void SPMeta2Model_NewFarmModel_Contract()
+ {
+ var expectedType = typeof(FarmModelNode);
+ var newDefinition = new FarmDefinition();
+
+ // new
+ Assert.IsTrue(SPMeta2Model.NewFarmModel().GetType() == expectedType);
+
+ // new with callback
+ Assert.IsTrue(SPMeta2Model.NewFarmModel(model => { }).GetType() == expectedType);
+
+ // new definition
+ Assert.IsTrue(SPMeta2Model.NewFarmModel(newDefinition).GetType() == expectedType);
+
+ // new definition with callback
+ Assert.IsTrue(SPMeta2Model.NewFarmModel(newDefinition, farm => { }).GetType() == expectedType);
+ }
+
+ [TestMethod]
+ [TestCategory("Regression.SPMeta2Model.NewXXXModel")]
+ [TestCategory("CI.Core")]
+ public void SPMeta2Model_NewWebAppModel_Contract()
+ {
+ var expectedType = typeof(WebApplicationModelNode);
+ var newDefinition = new WebApplicationDefinition();
+
+ // new
+ Assert.IsTrue(SPMeta2Model.NewWebApplicationModel().GetType() == expectedType);
+
+ // new with callback
+ Assert.IsTrue(SPMeta2Model.NewWebApplicationModel(model => { }).GetType() == expectedType);
+
+ // new definition
+ Assert.IsTrue(SPMeta2Model.NewWebApplicationModel(newDefinition).GetType() == expectedType);
+
+ // new definition with callback
+ Assert.IsTrue(SPMeta2Model.NewWebApplicationModel(newDefinition, farm => { }).GetType() == expectedType);
+ }
+
+ [TestMethod]
+ [TestCategory("Regression.SPMeta2Model.NewXXXModel")]
+ [TestCategory("CI.Core")]
+ public void SPMeta2Model_NewSiteModel_Contract()
+ {
+ var expectedType = typeof(SiteModelNode);
+ var newDefinition = new SiteDefinition();
+
+ // new
+ Assert.IsTrue(SPMeta2Model.NewSiteModel().GetType() == expectedType);
+
+ // new with callback
+ Assert.IsTrue(SPMeta2Model.NewSiteModel(model => { }).GetType() == expectedType);
+
+ // new definition
+ Assert.IsTrue(SPMeta2Model.NewSiteModel(newDefinition).GetType() == expectedType);
+
+ // new definition with callback
+ Assert.IsTrue(SPMeta2Model.NewSiteModel(newDefinition, node => { }).GetType() == expectedType);
+ }
+
+
+ [TestMethod]
+ [TestCategory("Regression.SPMeta2Model.NewXXXModel")]
+ [TestCategory("CI.Core")]
+ public void SPMeta2Model_NewWebModel_Contract()
+ {
+ var expectedType = typeof(WebModelNode);
+ var newDefinition = new WebDefinition();
+
+ // new
+ Assert.IsTrue(SPMeta2Model.NewWebModel().GetType() == expectedType);
+
+ // new with callback
+ Assert.IsTrue(SPMeta2Model.NewWebModel(model => { }).GetType() == expectedType);
+
+ // new definition
+ Assert.IsTrue(SPMeta2Model.NewWebModel(newDefinition).GetType() == expectedType);
+
+ // new definition with callback
+ Assert.IsTrue(SPMeta2Model.NewWebModel(newDefinition, node => { }).GetType() == expectedType);
+ }
+
+ [TestMethod]
+ [TestCategory("Regression.SPMeta2Model.NewXXXModel")]
+ [TestCategory("CI.Core")]
+ public void SPMeta2Model_NewListModel_Contract()
+ {
+ var expectedType = typeof(ListModelNode);
+ var newDefinition = new ListDefinition();
+
+ // new
+ Assert.IsTrue(SPMeta2Model.NewListModel().GetType() == expectedType);
+
+ // new with callback
+ Assert.IsTrue(SPMeta2Model.NewListModel(model => { }).GetType() == expectedType);
+
+ // new definition
+ Assert.IsTrue(SPMeta2Model.NewListModel(newDefinition).GetType() == expectedType);
+
+ // new definition with callback
+ Assert.IsTrue(SPMeta2Model.NewListModel(newDefinition, node => { }).GetType() == expectedType);
+ }
+
+ #endregion
}
}
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs
index a02867410..2ad097068 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs
@@ -30,6 +30,7 @@
using SPMeta2.Standard.Definitions.DisplayTemplates;
using SPMeta2.Validation.Services;
using SPMeta2.Exceptions;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Tests.Impl.Random
{
@@ -54,7 +55,7 @@ public void RandomDefinitionTest_ShouldHave_Tests_ForAllDefinitions()
foreach (var def in allDefinitions)
{
- Trace.WriteLine(def.Name);
+ RegressionUtils.WriteLine(def.Name);
}
var isValid = true;
@@ -65,7 +66,7 @@ public void RandomDefinitionTest_ShouldHave_Tests_ForAllDefinitions()
if (!hasTestMethod)
{
- Trace.WriteLine(string.Format("[ERR]:{0}", definition.Name));
+ RegressionUtils.WriteLine(string.Format("[ERR]:{0}", definition.Name));
isValid = false;
}
@@ -78,7 +79,7 @@ private bool HasTestMethod(string methodPrefix, Type definition, MethodInfo[] me
{
var methodName = string.Format("{0}{1}", methodPrefix, definition.Name);
- Trace.WriteLine(string.Format("Asserting method:[{0}]", methodName));
+ RegressionUtils.WriteLine(string.Format("Asserting method:[{0}]", methodName));
var targetMethod = methods.FirstOrDefault(m => m.Name == methodName);
@@ -97,7 +98,7 @@ public RandomDefinitionTest()
EnablePropertyNullableValidation = true;
PropertyNullableGenerationCount = 1;
- RegressionService.ShowOnlyFalseResults = true;
+ RegressionService.ShowOnlyFalseResults = false;
}
#region common
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/RegressionAPI/RegressionAPITests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/RegressionAPI/RegressionAPITests.cs
index f6f18f4e8..601c06a74 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Impl/RegressionAPI/RegressionAPITests.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/RegressionAPI/RegressionAPITests.cs
@@ -44,7 +44,7 @@ public void ExpectUpdateAttributes_ShouldHave_Services()
updateAttrServices.AddRange(ReflectionUtils.GetTypesFromAssembly(typeof(ExpectUpdateValueServiceBase).Assembly)
.Select(t => Activator.CreateInstance(t) as ExpectUpdateValueServiceBase));
- TraceUtils.WithScope(trace =>
+ IndentableTrace.WithScope(trace =>
{
foreach (var attr in updateAttrTypes)
{
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Reports/DefinitionReportTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Reports/DefinitionReportTests.cs
index 98348dfa4..c66370f04 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Reports/DefinitionReportTests.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Reports/DefinitionReportTests.cs
@@ -6,7 +6,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
+using System.Text;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Tests.Impl.Reports
@@ -41,7 +42,7 @@ public void CreateDefinitionCoverageReport()
var validatedProps = allProps.Where(p => p.GetCustomAttributes(typeof(ExpectValidationAttribute)).Any());
var updatableProps = allProps.Where(p => p.GetCustomAttributes(true).Any(a => (a as ExpectUpdate) != null));
- Trace.WriteLine(definitionType.Name);
+ RegressionUtils.WriteLine(definitionType.Name);
result.Append("");
@@ -73,7 +74,7 @@ public void CreateDefinitionCoverageReport()
result.AppendFormat("{0} | ", isValidated);
result.AppendFormat("{0} | ", isUpdated);
- Trace.WriteLine(string.Format("{0}{1} - validated:{2} updated:{3}", '\t', prop.Name, isValidated, isUpdated));
+ RegressionUtils.WriteLine(string.Format("{0}{1} - validated:{2} updated:{3}", '\t', prop.Name, isValidated, isUpdated));
isFirst = false;
@@ -89,7 +90,7 @@ public void CreateDefinitionCoverageReport()
}
var reportHtml = result.ToString();
- Trace.WriteLine(reportHtml);
+ RegressionUtils.WriteLine(reportHtml);
}
#endregion
diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/AppScenariousTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/AppScenariousTest.cs
index affb3895d..c045acdcd 100644
--- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/AppScenariousTest.cs
+++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/AppScenariousTest.cs
@@ -19,7 +19,8 @@
using SPMeta2.Containers.Consts;
using System.Diagnostics;
using SPMeta2.Exceptions;
-using SPMeta2.Regression.Tests.Utils;
+using SPMeta2.Regression.Tests.Utils;
+using SPMeta2.Regression.Utils;
namespace SPMeta2.Regression.Tests.Impl.Scenarios
@@ -215,8 +216,8 @@ private void AddAndCheckRandomAppWithVersion(WebModelNode web, Version version)
{
app.OnProvisioned